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

[whatwg] level attribute

From: Jonathan Worent <jworent@yahoo.com>
Date: Sun, 6 Aug 2006 16:13:30 -0700 (PDT)
Message-ID: <20060806231330.82699.qmail@web32211.mail.mud.yahoo.com>
--- juanrgonzaleza at canonicalscience.com wrote:

> Jonathan Worent said:
> >
> > 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>
> 
> This remember me the highlight tag of some markup language.
> 
> >         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.
> 
> Not necesarily.
> 
> <em>level-1<em>level-2</em></em>
> 
> <em class="dem">level-2<em class="dem">level-1</em></em>
> 
> define proper CSS rules for <em class="dem">

And what if the css is ignored? The text gets emphesized instead of de-emphesized, which totally
changes the meaning of the text. Using a level attribute make the meaning of the text explicit
to
the markup. Let me explain that. The fact that some text is given more or less
emphesis/importance
than other text changes its meaning. That should therefore be conveyed in the html. You can use
css to modigy the way is it interpreted, but if the css is ignored the meaning is not changed.
> 
> but more natural appears to be changing the markup for deemphasizing.
> 
> <em><em>level-2</em><em>level-1</em>

Can you give an example using proper sentince structure. I think there would be some instances
where rearranging the sentince would be better but not in most cases.
> 
> > 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.
> 
> The advantage of nesting and reason for the new heading model of XHTML2 is
> in that you do not need be aware of structure at each instant. Absolute
> levels h1, h2, h3... are to be avoided in next XHTML2. Why would we
> reintroduce it in <em> and <strong> now?
> 
> I also find problems with CSS and definition of levels. Is level="2"
> absolute, i.e. independent of position of <em>, or relative, i.e.
> level="2" over level="0" defined by container?

I'm not totally sure what you mean. <strong level="3"> should have more importance than <strong
level="2"> no matter the nesting. Of course, it would be bad practice to skip levels.
> 
> > Thank you,
> > Jonathan
> >
> 
> > 
> > Juan R.
> > 
> > Center for CANONICAL |SCIENCE)
> > 
> > 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Received on Sunday, 6 August 2006 16:13:30 UTC

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