tag is used to create multiple sections in a web browser window, allowing each section to load content independently. However, it is deprecated due to usability and SEO issues, replaced by the
0% found this document useful (0 votes)
4 views3 pages

UNIT 5 HTML

The HTML <frame> tag is used to create multiple sections in a web browser window, allowing each section to load content independently. However, it is deprecated due to usability and SEO issues, replaced by the <iframe> tag and modern layout techniques like CSS Grid. Common attributes of the <frame> tag included src, name, scrolling, and noresize, but it has been largely replaced by more versatile and compatible methods in HTML5.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views3 pages

UNIT 5 HTML

The HTML <frame> tag is used to create multiple sections in a web browser window, allowing each section to load content independently. However, it is deprecated due to usability and SEO issues, replaced by the <iframe> tag and modern layout techniques like CSS Grid. Common attributes of the <frame> tag included src, name, scrolling, and noresize, but it has been largely replaced by more versatile and compatible methods in HTML5.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

HTML frame Tag

HTML <frame> tag is used to divide web browser windows into


multiple sections, each capable of loading content independently.
This is achieved using a collection of frames within a frameset
tag.
<!DOCTYPE html>
<html>

<body>
<frameset rows="20%, 60%, 20%">
<frame name="top"
src="./attr1.html" />
<frame name="main"
src="./gradient.html" />
<frame name="bottom"
src="./colLast.html" />
<noframes>
<p>The browser you are using does not support
frames.</p>
</noframes>
</frameset>
</body>

</html>

Syntax
<frameset cols="50%, 50%">
<frame src="page1.html">
<frame src="page2.html">
</frameset>
HTML frame Tag Attributes
HTML <frame> name Attribute
This attribute is used to give names to the frame. It differentiate
one frame from another. It is also used to indicate which frame a
document should loaded into.
Example
<frame name = "top" src =
"C:/Users/dharam/Desktop/attr1.png" />
<frame name = "main" src =
"C:/Users/dharam/Desktop/gradient3.png" />
<frame name = "bottom" src =
"C:/Users/dharam/Desktop/col_last.png" />
Here we use three frames with names as left center and right.
HTML <frame> src Attribute
This attribute in frame tag is basically used to define the source
file that should be loaded into the frame.The value of src can be
any url.
Example
<frame name = "left" src = "/html/left.htm" />
In the above example name of frame is left and source file will be
loaded from “/html/left.htm” in frame.
HTML <frame> marginwidth Attribute
This attribute in frame tag is used to specify width of the spaces
in pixels between the border and contents of left and right
frame.
Example
<frame marginwidth="20">
HTML <frame> marginheight Attribute
This attribute in frame tag is used to specify height of the spaces
in pixels between the border and contents of top and bottom
frame.
Example
<frame marginheight="20">
HTML <frame> scrollbar Attribute
To control the appearance of scroll bar in frame use scrollbar
attribute in frame tag. This is basically used to control the
appearance of scrollbar. The value of this attribute can be yes,
no, auto. Where the value no denotes there will be no
appearance of scroll bar.
Example
<frame scrollbar="no">

Why is the <frame> tag deprecated?


The <frame> tag is deprecated because it causes significant
usability, accessibility, and SEO issues. It has been replaced by
more modern approaches like <iframe> and CSS for layout
purposes.
What replaced the <frame> and <frameset> tags in
HTML5?
The <iframe> tag and modern layout techniques like Flexbox
and CSS Grid have replaced the <frame> and <frameset> tags.
<iframe> allows embedding content while maintaining modern
web standards.
What attributes were commonly used with the <frame>
tag?
Common attributes included:
 src: Specifies the URL of the content to be displayed in
the frame.
 name: Gives the frame a name, allowing links to target
that frame.
 scrolling: Controls whether scrollbars appear (values:
“yes”, “no”, “auto”).
 noresize: Prevents the user from resizing the frame.
How does the <frame> tag differ from the <iframe> tag?
The <frame> tag is used within a <frameset> to define sections
of a page, while the <iframe> tag is used to embed content
within a single page. <iframe> is more versatile and compatible
with modern HTML5 standards.
How did the <frame> tag impact website navigation?
The <frame> tag often led to confusing navigation because each
frame could independently load different content, making it
difficult for users to bookmark specific pages or use the
browser’s back/forward buttons effectively.

What to Use Instead?


Example
Use the <iframe> tag to embed another document within the current HTML
document

<!DOCTYPE html>
<html>
<body>
<h1>The iframe element</h1>
<iframe src="https://www.w3schools.com" title="W3Schools Free Online Web Tutorials">
</iframe>
</body>
</html>

You might also like