HTML - Frames
HTML - Frames
Basic Web
Structures
HTML CODE
<html>
<body>
<frameset cols="30%,*">
<frame src="menu.html">
<frame src="content.html">
</frameset>
</body>
</html>
FRAME SET
frameset - The parent tag that defines the characteristics of
this frames page. Individual frames are defined inside it.
frameset cols="#%, *" - The width that each frame will have.
In the above example, we chose the menu (the 1st column) to
be 30% of the total page and used a "*", which means the
content (the 2nd column) will use the remaining width for
itself (70%).
FRAME SET
frame src="" - The URL of the web page to load into the frame.
A good rule of thumb is to call the page which contains this
frame information "index.html", as that is typically a site's
main page.
Description
Assigns a name to a frame. This is useful for loading contents into one frame from
another.
longdesc
A long description - this can elaborate on a shorter description specified with the title
attribute.
src
Location of the frame contents (for example, the HTML page to be loaded into the frame).
noresize
Specifies whether the frame is resizable or not (i.e. whether the user can resize the frame
or not).
scrolling
Whether the frame should be scrollable or not (i.e. should scrollbars appear). Possible
values:auto
yes
no
frameborder
Whether the frame should have a border or not. Possible values:1 (border)
0 (no border)
marginwidth
Specifies the margin, in pixels, between the frame's contents and it's left and right
margins.
marginheight
Specifies the margin, in pixels, between the frame's contents and it's top and bottom
margins.
QUICK RECAP
<html>
<head>
<title>Frameset page<title>
</head>
<frameset cols = "25%, *">
<noframes>
<body>Your browser doesn't support frames.
Therefore, this is the noframe version of the
site.</body>
</noframes>
<frame src ="frame_example_left.html" />
<frame src ="frame_example_right.html" />
</frameset>
</html>
HTML ENTITIES
Cent
English Pound
¢
£
Currency
Yen
¤
¥
Registered Trademark
®
Degree(s)
°
Plus or Minus
±
Fraction
¼
Fraction
½
Fraction
¾