Re: Ambiguity About Structuring Elements

On Sat, 2015-05-30 at 19:33 -0500, Adam Spelbring wrote:

> 
> I am an 18 year veteran web designer and developer. Sadly, I'm still 
> struggling with some questions that I so desperately want to 
> understand. And those have to do with the HTML5 structural elements. 
> (section, aside, article, etc.) From the W3C specification, I 
> interpret these elements as giving context to the page, helping the 
> page have more meaning, but are not to be used for styling purposes. 
> However, that is my interpretation.

Personal response...

The elements are not to be used for the sole purpose of introducing 
style. Instead, use (for example) a section element to contain a 
section of text - and then, yes, give it style.

> 
> > > > 
> What needs to be clarified is if these structural elements are 
> intended to have classes and IDs for styling purposes when they are 
> used properly and semantically, or are they intended to give the 
> page content semantic meaning only?

These things are not mutually exclusive, it seems to me - there's no 
reason not to give style to a section element. Of course, since it has 
a name (section), you're less likely to need a class or id attribute.

Similarly you could format an "aside" element - maybe as a sidebar in a
printed magazine, or on a Web page maybe in a collapsible box. You 
could think of <aside> as a shared agreed-on equivalent to <div 
class="aside">. Because it's agreed-upon, people can write generic Web 
tools that depend on it or make use of it. But you could give style to 
<div class="aside">...</div> too.

> 
> If anyone knows the correct answer to these questions, I (and 
> probably many others) would be immensely grateful if you would share 
> your insights.

There often isn't a single "correct" answer.

Liam


-- 
Liam R. E. Quin <liam@w3.org>
XML Activity Lead,
The World Wide Web Consortium (W3C)

Received on Sunday, 31 May 2015 02:03:08 UTC