Frameset Tag
The frameset tag defines a general layout of a web page that uses frames. It creates a table of documents in which each rectangle (called a frame) holds a separate document. In its simplest form, it states how many columns or rows will be there in the frameset. The <frameset> tag used in XHTML is exactly similar to the <frameset> tag of HTML.
Attributes of Frameset Tag
Cols and Rows
Cols and Rows set the quantity and sizes of the columns and rows in a frameset. The value for each attribute is a comma (,) separated by a list of sizes (in percentage).
Example |
<frameset rows=”20%,*” cols=”40%,*”> |
<frame src= “title.html” name=”title”/> |
<frame src=”body.html” name=”body”/>
<frame src=”data.html” name=”data” />
<frame src=”image1.jpg” name=”image” /> |
</frameset> |
| |
Frameborder
Frameborder determines whether there should be 3D borders between the frames. It takes up two values- Yes and No. Yes, which is the default value sets the 3D frame border. No does not set a 3D border.
Example |
<frameset rows=”30%,*” frameborder=no> |
|
</frameset> |
| |
Framespacing and Border
Framespacing and borders are one and the same thing. It sets the space between the frames indicating how big the borders should be.
Internet explorer understands only framespacing and netscape understands only border.
Example |
<frameset rows=”30%,*” framespacing=30 border=30> |
|
</frameset> |
| |
Bordercolor
Bordercolor sets the color of the border in the frameset.
Example |
<frameset rows=”20%,30%,*” bordercolor=red> |
<frame src= “title.html” name=”title” scrolling=yes > |
<frame src=”body.html” name=”body” scrolling=no/>
<frame src=”data.html” name=”data” scrolling=auto/> |
</frameset> |
| |
NoFrames Tag
There are a large percentage of people on the web that use browsers that cannot read frames. The <noframes> tag holds the text that is to be displayed for browsers, which do not have frames. It should be the outermost frameset element. The <noframes> tag used in XHTML is exactly similar to the <noframes> tag of HTML.
Example |
|
<frameset rows=”20%,*”> |
<frame src= “title.html” name=”title”/> |
<frame src=”body.html” name=”body”/>
<noframes>
<p>this tex is for those people who cannot view the frames.</p>
</noframes> |
</frameset> |
| |
IFrame Tag
The <iframe> tag creates a web page which has an inline frame that contains another document. It creates a frame that sits in the middle of a regular non- framed page. It works like the <img> tag, the only difference being that instead of inserting a picture on the page, it puts up another web page. The <iframe> tag used in XHTML is exactly similar to the <iframe> tag of HTML.
Example |
<iframe src=”hello.html”> |
If you can see this then your browser does not understand iframes. |
</iframe> |
| |
|