- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hello,
I came across the following article which suggests the _header, section, article, footer_ tags in html5 should not be used for styling content… therefore classes/ ids should not be used to target css. The article is dated 2011, so Im curious if the suggested practice has changed at all. I continue to see other sites using classes and ids on the mentioned tags.
If anyone as any ideas or can suggest an updated article stating otherwise… I would much appreciate it. Thank you.
Article: http://html5doctor.com/avoiding-common-html5-mistakes/
I would agree they are not for styling content in that they are implemented for making a more semantic markup and should first and foremost be used in this way.
You don’t style div, span, h1, and p tags directly. Thus, you shouldn’t style header, article, section and footer directly.
The article is talking about “style” as in the markup not styling ie
is more semantic than say
but that is not to say that the second is wrong
or as to the
If this this the wrapper for this section then there is no problem using a class for styling as long as the section is being used correctly.
The issue is people doing this
some blog stuff…
when all they need is
some blog stuff…
off course, it only when people over extend there use to layout there site that it becomes “styling elements” rather that “structural elements” as they were intended