Copyright © tutorialspoint.com

HTML <frame> tag



Advertisements

Function:

The HTML <frame> tag is used to specify each frame within a frameset tag.

Difference between HTML and XHTML:

In HTML the <frame> tag has no end tag.

In XHTML the <frame> tag must be properly closed.

Example:

<frameset cols="200, *">
      <frame src="/html/menu.htm" name="menu_page" />
      <frame src="/html/main.htm" name="main_page" />
</frameset>

Online Practice:

To Become more comfortable - Do Online Practice

Attributes:

AttributeValueDescription
frameborder0 or 1Specifies whether or not to display border around the frame.
marginheightpixelsAllows you to specify the width of the space between the left and right of the frame's borders and the frame's content. The value is given in pixels. For example marginwidth="10".
marginwidthpixelsSpecifies the margin, in pixels, between the frame's contents and it's left and right margins.
nameframe nameName of the frame
noresizenoresizeWhen set to noresize the user cannot resize the frame.
scrollingyes
no
auto
Determines scrollbar action
srcURLLocation of the frame contents file

Standard Attributes:

AttributeDescription
classDocument wide identifier
idDocument wide identifier
titleSpecifies a title to associate with the element.
styleHelps to include inline casecadubf style sheet.

Copyright © tutorialspoint.com