[whatwg] header body footer

Roger Hågensen rescator at emsai.net
Fri Nov 9 12:04:00 PST 2012


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/




More information about the whatwg mailing list