Frame Support
All modern browsers support the use of frames and have had for the past several years. There are, however, a few people that don't have modern browsers or just don't like frames and have disabled frame support in their browser.
For these rare cases, there is a <noframes> tag. This tag is coded after the frameset and can present regular text and HTML for people not using frames to see. This is often either a message to turn on their frames support or a link to a non-framed version of the page.
Here's a <noframes> tagset in action:
<html>
<head>
<title>My First Frames</title>
<frameset cols="200,*">
<frame src="test1.htm">
<frame src="test2.htm">
</frameset>
<noframes>
You need frame support to view this page.
</noframes>
</head>
</html>
The above code would present its message if the browser did not support frames. Otherwise, the message is invisible.
Making A <body>
There are some enhancements you can make to the <noframes> tag. One is adding a <body> to the section. This is the only case where you'd have a <body> inside the <head> of a page.
<html>
<head>
<title>My First Frames</title>
<frameset cols="200,*">
<frame src="test1.htm">
<frame src="test2.htm">
</frameset>
<noframes>
<body bgcolor="#ffffff" text="#000000">
You need frame support to view this page.
</body>
</noframes>
</head>
</html>
Using the <body> tag above, I'm able to insure a white background and black text. Don't get carried away with content inside the <noframes> tags. Make it a simple warning or a link to a non-frames page.
Summary
You should include a <noframes> section with your <frameset> pages for people whose browsers don't support frames. The content of the <noframes> section should be a simple link or warning.
To Next Advanced HTML Lesson
Back To Advanced HTML Index
|