The Example Frame Code and Some Reference Tags
It's time to go through a test. All the pieces of the puzzle are coming together.
Here is an example, follow the left hand column in order for the code and the right hand column for a brief description.
<html>
<head>
<title>Title of page</title>
</head>
<frameset rows="*, 95">
<frame src="vidgame.html" name="Large">
<frame src="menu.html" name="Navbar">
<noframes>
</noframes>
</frameset>
</html>
<head>
<title>Title of page</title>
</head>
<frameset rows="*, 95">
<frame src="vidgame.html" name="Large">
<frame src="menu.html" name="Navbar">
<noframes>
</noframes>
</frameset>
</html>
| The basic structure of an HTML Frame | |
| <html> | Basic tag to start an HTML Document |
| <head> | Head of the tag. Can be used to add JavaScript or CSS for example. |
| <title> | Gives the page a name |
| </title> | Ends the title |
| </head> | Ender of the header tag |
| <frameset rows="*, 95"> | It begins a frame and has it set at 95 pixels in rows. |
| <frame src="vidgame.html" name="Large"> | It takes the top space and is the largest. The frame is named "large". |
| <frame src="menu.html" name="Navbar"> | Takes the lower space position. The frame is named "Navbar". |
| <noframes> | Pretty much thought of as like a <body> tag and has a page ready in case your browser doesn't read frames. |
| </noframes> | Like the </body> tag, this is where it ends |
| </frameset> | The frame has been completed. |
| </html> | It ends a document |
I also want you to know that there is a <iframe> tag. This tag create a "floating" frame on page. If it can't be seen, it won't be shown at all.
| Attributes of <iframe> tag. | |
| align | Determines alignment of <iframe> on page |
| frameborder | Shows or hides border around frame. |
| height | Height of frame |
| hspace | Horizontal space from frame to content |
| name | Determines the name of a frame |
| scrolling | Determines method of showing scrollbars. May have values:
auto - scrollbars shows is needed. no - hide scrollbars. yes scrollbars always shows. |
| src | Path to file or url which will be loaded in frame. |
| vspace | Vertical space from frame to content |
| width | Width of frame |
Here is what it could look like in hypothetical terms just look below.
Examples
<iframe src="http://www.tufat.com" width="100%"><iframe>
Simple example of iframe.
<iframe src="http://www.tufat.com" width="1" height="1" frameborder="0"></iframe>
This example shows how some web-developers make hidden frames on page. For what? If link on third-side's site insert into an iframe, it will lead to false increase of a visitors' quantity.
HTML Frames menu.