Htmlshell - generate HTML skeletons
htmlshell.com
htmlshell.com
e.g. box centered in the center of the screen, three column fixed, two column flexible, etc.
here's a page with a whole listing of example css layouts. http://www.maxdesign.com.au/articles/css-layouts/
To be more DRY, shouldn't the "Autorun JavaScript" make use of selected JavaScript libraries (i.e. jQuery if possible)?
Moreover, html5boilerplate recommends NOT to include the /1/ query: http://html5boilerplate.com/html5boilerplate-site/built/en_U...
The opening and closing body and head tags aren't needed, nether is the closing html tag. It doesn't make that much difference to the page as a whole but it adds another level of indenting to your code and makes it more complicated than it needs to be.
"Let us redefine progress to mean that just because we can do a thing, it does not necessarily mean we must do that thing."
Other than the initial level of indenting, which is basically a non-issue for most people I suspect, there just isn't any reason to omit tags like this.
At the same time, they make the markup clearer, and help a reader quickly delineate between two important sections of the document. Therefore, since they provide at least a very small positive benefit, it is perfectly reasonable, IMHO, to include them.
We frequently see things like JavaScript pulled in at the bottom of documents -- the head and body long since stopped having functional impacts, and all they seem to do is make you feel guilty about doing things it seems it's not only pragmatic but perfectly OK to do now.
I guess omitting the outermost HTML tags would disturb me slightly if one wants to keep XML-ish. But then it's always bugged me that XML kind of assumes the "file" has no semantic significance.
But even now knowing that info... I will continue to use them. Yes, it adds another level of indenting... but personally I prefer that. Text that is without a left margin tends to be a little harder to read. I also like to have a visual grouping of the elements. I think I would disagree that it "makes it more complicated" to have those tags.
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<title>TITLE</title>
Is nicer than <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>TITLE</title>
</head>
<body>
</body>
</html> <!DOCTYPE html>
<meta charset="UTF-8">
<title>TITLE</title>
Look at that, I saved you another indent.I think the recent Google Style Guide [2] has made this en vogue, but hipster points for anyone who knew about it before.
[1] http://www.whatwg.org/specs/web-apps/current-work/multipage/...
[2] http://google-styleguide.googlecode.com/svn/trunk/htmlcssgui...
http://www.w3.org/TR/REC-html40/charset.html#h-5.2.2
And a supporting talk by paul irish http://paulirish.com/2011/primitives-html5-video/
Perhaps my HTML5 introduction pitched it that way, or perhaps I just jump to conclusions too easily, but nice to know I've gotten it right, even if only by accident.
1. Dinna know you could skip them "legally"
2. Increased readability at nearly no cost
3. Concern that browser "x" will render crap if I skip them.
I don't see it as a redundant tag, not at all.
Also you can simply not indent html and body.
Personally, I just like the idea of opening and closing tags that clearly define what's going on in the markup.