[whatwg] Re: Are the semantic inline elements really useful?

Henri Sivonen wrote:
> On Aug 28, 2005, at 11:02, Lachlan Hunt wrote:
> 
>> Although some editors do also provide some semantic options, they're 
>> usually limited in their abilities.  Some have some semantic block 
>> level elements like headings, paragraphs, lists and maybe blockquote. 
>> However, few have semantic elements like abbr, cite, code, dfn, kbd, 
>> samp, var, q and strong/em (some, like contentEditable, mistakenly use 
>> bold and italic options for those).  I often have to jump through 
>> hoops just to get <code> in my markup while using dreamweaver, by 
>> using the buttons for <b> and/or <i> and then running search and 
>> replace to fix up the markup.
> 
> Could the user interface difficulties with this semantic inline elements 
> stem at least partly from problems with the semantic inline elements 
> themselves?

I don't think so.  I think it stems from the average person who thinks 
about things presentationally and jumps straight from "what is the 
content" to "how do I want it to look" and then marks that up.  The 
problem is then compounded by poorly designed authoring tools that 
encourage such practices.

> Consider <cite> for example. What's it really good for?...
> 
> ... The scenario that perhaps in the future there will be a need to
> style the titles of works in a different way (for example bold
> strike-through fuchsia) seemed ludicrous.

Yes, it does seem ludicrous when you immediately think a different style 
involves such radical changes.  However, what if you just want to be 
able to differentiate citations from emphasis, definitions, and anything 
else presented in italics by default.  For example, your stylesheet 
might say something like this:

/* default UA stylesheet */
em, cite, dfn, i { font-style: italic; }

/* Author stylesheet */
em { background-color: #EEF; }
cite { color: gray; }
dfn { font-weight: bold; }

> Aside: Now that I looked at the source of the literature list, I noticed 
> that some titles of works were marked up as <em>. my hypothesis is that 
> after an upgrade Dreamweaver has started using <em> when pressing 
> command-i. Sigh. See http://mpt.net.nz/archive/2004/05/02/b-and-i

That's another problem with WYSIWYG editors, when they attempt to imply
semantics based on how the user wan't something to look, instead of 
letting the user specify semantics and determine presentation from that.

> P.S. Using <cite> and <code> is relatively easy with OOo Writer/Web but 
> not as easy as pressing command-i.

That's a limitation of the editor, and similar to the point I was trying
to make when I said above, in the part you quoted: "I often have to jump
through hoops just to get <code> in my markup [...] by using [...] <b>
and/or <i> and then running search and replace..."

-- 
Lachlan Hunt
http://lachy.id.au/

Received on Sunday, 4 September 2005 03:58:52 UTC