Name

frame — HTML 4.01

Synopsis

HTML: <frame>; XHTML: <frame/> or <frame />

Defines a single frame within a frameset.

Notes

Not in HTML5. The frameset, frame, and noframes elements are not included in HTML5.

Start/End Tags

This is an empty element. In HTML, the end tag is forbidden. In XHTML, the element must be closed with a trailing slash as just shown. Developers may include a space character before the slash for backward compatibility with older browsers.

Attributes

Core

frameborder="1|0"

Determines whether there is a 3D separator drawn between the current frame and surrounding frames. A value of 1 turns the border on. A value of 0 turns the border off. The default value is 1 (border on).

longdesc ="URL"

Specifies a link to a document containing a long description of the frame’s contents. Although longdesc is included in the HTML 4.01 and XHTML 1.0 Recommendations, no browsers currently support it.

marginheight="number"

Specifies the amount of space (in pixels) between the top and bottom edges of the frame and its contents. The minimum value according to the HTML 4.01 specification is 1 pixel. Setting the value to 0 to place objects flush against the edge of the frame works in some browsers but may yield inconsistent results.

marginwidth="number"

Specifies the amount of space (in pixels) between the left and right edges of the frame and its contents. The minimum value according to the HTML specification is 1 pixel. Setting the value to 0 to place objects flush against the edge of the frame works ...

Get HTML & XHTML Pocket Reference, 4th Edition 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.