[whatwg] level attribute
jworent at yahoo.com
Sun Aug 6 16:13:30 PDT 2006
--- 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 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
the markup. Let me explain that. The fact that some text is given more or less
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.
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
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
More information about the whatwg