Forum Moderators: open

Message Too Old, No Replies

<body> Within <noframes>

Stupid Q from someone who should know the answer . . . .

         

rocknbil

12:56 am on Dec 5, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't like frames/iframes but have a situation where my hand is forced. It's been a very.long.time since I worked with them. (I do know how to do <object> and write to <div>, it just won't work in this situation. Client editing won't allow it.)

I know the <body> element within <noframes> is not required, funny thing is, it still validates either way:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" 
"http://www.w3.org/TR/html4/frameset.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Untitled</title>
<meta name="Description" content="">
<meta name="keywords" content="">
<link rel="stylesheet" type="text/css" href="">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
</head>
<frameset rows="50%,*">
<frame src="">
<frame src="">
<noframes>
<body>
<p>Don't just say your browser doesn't support
frames. Put content here.</p>
</body>
</noframes>
</frameset>
</html>

Validated in XHTML too, not doing any extending and target server doesn't output text/xhtml headers, don't need XHTML.

Pro with no body: 15 characters less, including newlines.

Pro with body: CSS styles will still apply to the <noframes> content (probably . . . .)

What do you think? I searched, found mixed opinions . . . .

daveVk

1:28 am on Dec 5, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



On the assumption that old browsers ignore all tags to do with frames you have

...
</head>
<body>
<p>Don't just say your browser doesn't support
frames. Put content here.</p>
</body>
</html>

Looks good to me.

Samizdata

2:02 am on Dec 5, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have some older content with <body> tags inside <noframes> but it is not CSS based.

I also have some recent bodyless <noframes> with <div> tags inside and CSS working fine.

Using a <div> will save a couple of characters over a <body> at least.

...

rocknbil

3:55 am on Dec 5, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



On the assumption that old browsers ignore all tags to do with frames you have....

<smacks forehead> Yeah . . . . a valid document with a body! lol . . . . Thanks for the responses.