|
Frames are another example of simple HTML that can become very complex. Complicated framesets with nested frames can be quite confusing to set up. However, a basic frameset is easy to do. The following table lists the necessary elements and attributes:
To Do This | Use This |
---|---|
Add an XHTML frameset <!DOCTYPE> declaration |
<!DOCTYPE html PUBLIC "-//W3C// |
Create a frameset | <frameset> </frameset> |
Create a frame | <frame /> |
Specify a frame’s source file | <frame src="/books/4/238/1/html/2/page1.htm" /> |
Assign a name to your frame | <frame name="frame1" /> |
Provide content for noncompatible browsers | <noframes> </noframes> |
Specify rows | <frameset rows="#"> (Pixels or percentages) |
Specify columns | <frameset cols="#"> (Pixels or percentages) |
Turn borders off | <frame frameborder="no" /> |
Prevent resizing | <frame noresize /> |
Add or remove scroll bar | <frame scrolling="auto | yes | no" /> |
Control margins | <frame marginheight="#" marginwidth="#" /> |
Create a two column frameset |
<frameset cols="#, #"> |
Create a two row frameset |
<frameset rows="#, #"> |
Create a nested frameset |
<frameset cols="#, #"> |
|