[whatwg] level attribute
jworent at yahoo.com
Thu Aug 3 12:04:11 PDT 2006
I have just recently become interested in the work WHATWG is doing. I apologize if something like this has already been suggested.
I'd like to suggest adding a level attribute to both em and strong tags. This attribute would be used to set the level of emphasis/importance, rather than by nesting. The level attribute would take a negative integer, to indicate, de-emphasis/less importance, a positive integer, to indicate increasing emphasis/importance, or a "0", to indicate the default. If the default is desired the level attribute could be left off, unless it is nested within an element that has changed the level (though I can't think of any examples where this would be good practice). There would need to be a reasonable limit for the number of levels, both positively and negatively
<em level="2">I am getting <em level="3">very</em> angry.</em>
I don't spend every waking moment on the computer, <strong level="-1">although my wife thinks otherwise</strong>.
<strong level="1">This is a bad example of where the <strong level="0">default level</strong> has to be explicit stated.</strong>
I think a level attribute is better than nesting because it allows for reducing the emphasis/importance below normal. Nesting can only increase this.
A use-case where de-emphasis would be needed is in marking up a transcript. (WCAG requires this for accessibility) De-emphasis could be used to indicate that the speaker whispered.
A use-case where indicating less importance would be needed would be digression. This is different than aside IMHO.
I understand that this is not backwards compatible. But, IMHO, neither is nesting elements. Future browsers already will have to change to understand that nesting em or strong increases emphasis/importance. They could also be changed to understand the level attribute.
If this cannot be done then I would suggest as an alternative: Add 2 new elements. One for indicating de-emphasis, One of indicating less importance. I leave the naming of them to you.
Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail Beta.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the whatwg