W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2012

[whatwg] header body footer

From: Roger Hågensen <rescator@emsai.net>
Date: Fri, 09 Nov 2012 21:04:00 +0100
Message-ID: <509D61B0.9010605@emsai.net>
To: whatwg@lists.whatwg.org
Starting a new subject on this to keep the email threads more clear:

Suggestion is that the following should be possible,
this would allow <body> to act as if it was a <main>.

<!doctype html>
<html>
<head>
<title>header and footer outside body</title>
<style>
body {border:1em solid #7f2424;}
header {border:1em solid #247f24;}
footer {border:1em solid #24247f;}
</style>
</head> <!-- I wish the <head></head> tags was called <meta></meta> 
instead. -->
<header>
This is the header of the document!
</header>
<body>
This is the main content of the document!
</body>
<footer>
This is the footer of the document!
</footer>
</html>


As can be seen in most modern browsers. Semantically the content appear 
correctly.
The only issue is the css styling of <body> as <body> is treated as the 
parent of <header> and <footer>.
I'm not sure how much work or not it would be to allow 1 
<header></header> and 1 <footer></footer> outside <body> and let those 
have <html> as their parent instead,
but if it's not too much work then this could "fix" the lack of a 
<main>, and it would avoid the need of using a extra <div> or similar 
inside <body> just for styling.

Any other pros (or cons)?


-- 
Roger "Rescator" Hågensen.
Freelancer - http://www.EmSai.net/
Received on Friday, 9 November 2012 20:25:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:11 GMT