XML technologies / HTML & XHTML / Alphabetical list of HTML and XHTML elements / frame

(Excerpt from "HTML & XHTML ─ kurz & gut" by Jennifer Niederst Robbins)

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

   

frame

HTML 4.01

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

Defines a single frame within a frameset element.

Notes

Not available in HTML 5. The elements frameset, frame and noframes are not part of HTML 5.

Start/end tag

This is an empty element. HTML forbids an end tag. In XHTML, the element must end with a slash before the closing angle bracket. Developers can insert a space before the slash to improve backward compatibility with older browsers.

Attributes

Core

  • frameborder="1|0"

    Specifies whether a 3D border appears between this frame and surrounding frames. The value 1 enables the border; the value 0 disables it. The default is 1 (border displayed).

  • longdesc ="URL"

    Defines a link to a text document containing a long description of the frame’s content. Although longdesc is part of HTML 4.01 and XHTML 1.0, no browser supports this attribute.

  • marginheight="Zahl"

    Defines the space in pixels between the frame’s top and bottom edges and its content. HTML 4.01 specifies a minimum of 1 pixel. A value of 0 places content directly against the frame’s outer edges. This works in some browsers, but results can vary greatly.

  • marginwidth="Zahl"

    Defines the space in pixels between the frame’s left and right edges and its content. HTML 4.01 specifies a minimum of 1 pixel. A value of 0 places content directly against the frame’s outer edges. This works in some browsers, but results can vary greatly.

  • name="Text"

    Deprecated in XHTML 1.0; use instead id. Assigns a name to the frame. Links in other documents can use it to load the target document in this frame.

  • noresize (noresize="noresize" in XHTML)

    Prevents users from resizing the frame. By default, users can drag frame borders to resize frames even when a height and width are specified.

  • scrolling="yes|no|auto"

    Specifies whether the frame has scrollbars. The value yes always displays scrollbars; no prevents their display. The value auto displays scrollbars only when the content would not otherwise fit in the frame.

  • src="URL"

    Specifies the document or resource to display in the frame when the frameset loads.

Example

See the example for the element frameset.

 

> back to the alphabetical list of elements

   

 

 

 

back to top