weegillis
08-07-2011, 01:31 PM
Whenever a new implementation of the language of the web rolls out, we're right back at the starting point, it seems, where nobody can settle on what's good practice and what's not. I've just finished going over the use of structural elements SECTION (new) and DIV (old) and thought I had hit on something I could rely upon in this HTMLDoctor article, The section element (http://html5doctor.com/the-section-element/), (September 2009) wherein it interprets the spec as saying SECTION is not a style hook or wrapping container, but just a 'blob' within content. So I raced around changing all my code (there really isn't that much, yet) to match this interpretation. I removed SECTION and dropped in DIV, as suggested.
Then today I'm reading on TechRepublic, in the article, HTML5: The next generation, (July 2011), (my bolding)
What does HTML5 change?
As I briefly mentioned, there are major changes in the doctype declaration, the character set declaration, language values declaration, the way HTML documents are structured and sectioned, how scripts are called, and much more. The move toward semantic markup means that generally the use of IDs is recommended and the use of classes and Divs is now outdated and unnecessary. That’s right; I said Divs are now a thing of the past! With the structural and sectional elements available in HTML5, the use of Divs should only be added to HTML code as a last resort, and when all other element options have been exhausted. In essence HTML5 cures the cases of Div-itis and Class-itis.
Well if that doesn't just get you right where it hurts! So if SECTION is not the right structural element (a blob) and DIV is outdated and reserved only for the eleventh hour, then what is the correct structural element to use? ARTICLE? Well, ... no. Like SECTION, this is a semantic tag meant to wrap,
An independent piece of content...My bolding. Quoted from, The article element (http://html5doctor.com/the-article-element/).
Okay, so an ARTICLE is an independent, standalone segment consisting of sections, figures, etc. What does it get wrapped in to help it into the flow of the document, assuming it's not the only thing in the document? It's questions like this that get independent, standalone developers beating around the bush and going off in a completely unpredictible direction only to propagate a storm of incorrect markup. Not on purpose, but intuitively. WE make up our own interpretation and implementation of the specification and write it into our templates and methodologies only to find out years later that we got it wrong.
Just to throw a wrench into things, I discovered yesterday on the Mozilla Demo (https://demos.mozilla.org/) site one example [Awesome HTML5 Dashboard (https://mozillademos.org/demos/dashboard/demo.html)] where clearly SECTION is the adopted style hook. There are no DIV tags that I could see, save "plzwait". Is this a bit gray, or am I just going gray?
Then today I'm reading on TechRepublic, in the article, HTML5: The next generation, (July 2011), (my bolding)
What does HTML5 change?
As I briefly mentioned, there are major changes in the doctype declaration, the character set declaration, language values declaration, the way HTML documents are structured and sectioned, how scripts are called, and much more. The move toward semantic markup means that generally the use of IDs is recommended and the use of classes and Divs is now outdated and unnecessary. That’s right; I said Divs are now a thing of the past! With the structural and sectional elements available in HTML5, the use of Divs should only be added to HTML code as a last resort, and when all other element options have been exhausted. In essence HTML5 cures the cases of Div-itis and Class-itis.
Well if that doesn't just get you right where it hurts! So if SECTION is not the right structural element (a blob) and DIV is outdated and reserved only for the eleventh hour, then what is the correct structural element to use? ARTICLE? Well, ... no. Like SECTION, this is a semantic tag meant to wrap,
An independent piece of content...My bolding. Quoted from, The article element (http://html5doctor.com/the-article-element/).
Okay, so an ARTICLE is an independent, standalone segment consisting of sections, figures, etc. What does it get wrapped in to help it into the flow of the document, assuming it's not the only thing in the document? It's questions like this that get independent, standalone developers beating around the bush and going off in a completely unpredictible direction only to propagate a storm of incorrect markup. Not on purpose, but intuitively. WE make up our own interpretation and implementation of the specification and write it into our templates and methodologies only to find out years later that we got it wrong.
Just to throw a wrench into things, I discovered yesterday on the Mozilla Demo (https://demos.mozilla.org/) site one example [Awesome HTML5 Dashboard (https://mozillademos.org/demos/dashboard/demo.html)] where clearly SECTION is the adopted style hook. There are no DIV tags that I could see, save "plzwait". Is this a bit gray, or am I just going gray?