Key Points

  • Frames are not XHTML-compatible, but many people still use them for page layout.

  • A <frameset> tag contains one or more <frame> tags that define a default HTML file that appears within it.

  • In a frameset document, use a document type of HTML 4.01 Frameset, like this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">.

  • The frameset document does not have a regular <body> section; it contains only the frame descriptions.

  • In the <frameset> tag, define the column widths and/or row heights. Use a number for a specific number of pixels, or use an asterisk (*) to specify that the size will vary with the size of the browser window. For example, <frameset cols="100,*" rows="*,200">.

  • To provide an alternative ...

Get HTML and XHTML Step by Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.