W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2006

[whatwg] level attribute

From: Jonathan Worent <jworent@yahoo.com>
Date: Thu, 3 Aug 2006 12:04:11 -0700 (PDT)
Message-ID: <20060803190411.31803.qmail@web32212.mail.mud.yahoo.com>
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

    Examples:
        <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.

Thank you,
Jonathan
 		
---------------------------------
Do you Yahoo!?
 Next-gen email? Have it all with the  all-new Yahoo! Mail Beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20060803/dfb4c7b9/attachment.htm>
Received on Thursday, 3 August 2006 12:04:11 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:28 UTC