Frames in web page
The screen or web page can be divided into two or more regions by using <frameset> tag.
Each unique region is called frame and can display HTML page.
<frameset> tag :
HTML page can be divided into several regions by using <frameset> & </frameset> tag.
The screen can be divided into rows & columns by using the following attributes:
Attributes | Description | Values |
---|---|---|
rows : | This attribute divides screen into multiple horizontal rows. Value for this attribute can be percentage of the screen resolution or size in pixels or '*' indicating the remaining space of the available screen resolution. | pixels, %, * |
cols : | This attribute divides screen into multiple vertical columns.Value for this attribute can be percentage of the screen resolution or size in pixels or '*' indicating the remaining space of the available screen resolution. | pixels, %, * |
<frame> tag :
Once the screen is divided into regions each region can be fill with web page by using this tag. This tag can be used in between <frameset> & </frameset> tag. This tag don't have closing tag.
The <frame> tag provides following attributes:
Attributes | Description | Values |
---|---|---|
src : | Sets the URL of the page to be loaded. | URL |
marginheight : | Sets the amount of white space at the top & bottom of the frame. | pixels |
marginwidth : | Specifies the amount of white space at the right & left of the frame. | pixels |
name : | Sets the unique name for the frame so that the other documents or web pages can target this frame by using <a> tag with its target attribute. | name |
noresize : | Disables the frames resizing capability. | noresize |
scrolling : | Controls the appearance of the horizontal & vertical scroll bars in a frame. | yes, no, auto |
<iframe> tag :
This tag defines a rectangular region in a document in which browser displays separate web page including scroll bars & borders.
<iframe> tag provides following attributes:
Attributes | Description | Values |
---|---|---|
align : | Sets the alignment of an iframe. | left, middle, right, top or bottom |
src : | The URL of the frame to be appear in region. | URL |
name : | Sets the name for frame so it can be targeted. | name |
frameborder : | Sets the border around the frame. | 1 or 0 |
scrolling : | Controls the appearance of scroll bars. | yes, no, auto |
height : | Sets the height for frame in pixels. | pixels,% |
width : | Sets the width for frame in pixels. | pixels, % |
Now let's see these tags with the eg.,
<html>
<frameset rows="25%,*">
<frame src="http://prog101.blogspot.com" />
<frameset rows="50%,50%">
<frame src="http://prog101-html.blogspot.com" />
<frame src="http://prog101-html.blogspot.com/2007/03/getting-started-where-to-write-code.html" />
</frameset>
</frameset>
</html>
Inserting iframe into your document :
<iframe src ="http://prog101.blogspot.com" width="100%" height="300">
</iframe>
0 comments:
Post a Comment