HTML Frame Tag For Browser Page Layout

Frame Tag

When you want to divide your browser window into sections, In this situation, you can use HTML Frames. With the help of HTML Frames, browser window can be divided into multiple sections where every section can load a separate HTML document.

Note − The <frame> tag is deprecated in HTML5. Do not use this element.

Frameset Tag

When you are using more than one frames, then its know as a frameset. In this case, You have to use <frameset> Tag. For using frames on a web page, you use <frameset> tag instead of <body> tag.

Divide Browser window horizontally

The rows attribute of <frameset> tag defines horizontal frames. Each frame is indicated by <frame> tag and it defines which HTML document shall open into the frame.

Example:-

rows attribute in Frame HTMLrows attribute in Frames HTML

Divide Browser window vertically

The cols attribute of <frameset> tag defines vertical frames. Each frame is indicated by <frame> tag and it defines which HTML document shall open into the frame.

Example:-

Cols Attribute in Frame HTMLcols attribute in Frame HTML

“*”  Value in Frameset Tag

In the Following example, the First frame section is 20%, the second frame section is 40% and “*” indicates rest all.

"*" Feature in HTML Frames"*" feature in HTML Frames

IFrame Tag

An iframe is an inline frame in the HTML element that allows you to an external webpage to be embedded in an HTML document. Here, In the following example, we embedded a map in the iframe tag.

iframe in HTML

Output:-

iframe in HTML

Attributes of Frameset Tag

Attributes of Frameset TagDescription
rowsSpecify how many rows are contained in the frameset and the size of each row.
colsSpecify how many columns are contained in the frameset and the size of each column.
borderspecifies the width of the border of each frame in pixels
frameborderspecifies whether a three-dimensional border should be displayed between frames
framespacingspecifies the amount of space between frames in a frameset.

Attributes of Frame Tag

Attributes of Frame TagDescription
srcSpecify Source File to frames.
nameUsed to give a name to a frame
frameborderspecifies whether or not the borders of that frame are shown
marginwidthspecify the width of the space between the left and right of the frame’s borders and the frame’s content
marginheightspecify the height of the space between the top and bottom of the frame’s borders and its contents
noresizeresize any frame by clicking and dragging on the borders of a frame
scrollingcontrols the appearance of the scrollbars that appear on the frame
longdesclink to another page containing a long description of the contents of the frame

Hope you enjoyed reading the blog post. Let us know if you have any suggestions for the published content on the site. Feel free to contact us if you wish to register yourself in our skill upgradation courses.

For more such content subscribe to our YouTube channel – https://www.youtube.com/channel/UCcWR1IezEQynJnAETgK8g2w?sub_confirmation=1 and follow us on facebook – https://www.facebook.com/pristinetechschool

3 thoughts on “HTML Frame Tag For Browser Page Layout

  1. “As I web-site possessor I believe the content matter here is rattling fantastic , appreciate it for your efforts. You should keep it up forever! Good Luck.”

Leave a Reply

Your email address will not be published. Required fields are marked *