[whatwg] level attribute

juanrgonzaleza at canonicalscience.com juanrgonzaleza at canonicalscience.com
Mon Aug 7 03:22:12 PDT 2006


Jonathan Worent said:
> --- juanrgonzaleza at canonicalscience.com wrote:
>
>> Jonathan Worent said:
>> >
>> > 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.

Well, sure but why would the css be ignored?

Moreover, how would the level attribute degrade to old UAs. HTML 4
compatible systems would understand incorrectly the em structure, changing
the meaning also.

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

I cannot see any case where a level-n attribute cannot be represented as n
nested <em>s.

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

Take your example:

I don't spend every waking moment on the computer, <strong
level="-1">although my wife thinks otherwise</strong>.

A _current_ browser (asuming that can ignore the level attribute) would
understand:

I don't spend every waking moment on the computer, <strong>although my
wife thinks otherwise</strong>.

changing the meaning.

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

I do not understand this. We begin from a level-0 in HTML and next we add
levels of emphasis with <em>. Then

<p>normal level, <em>emphasis simple, <em>emphasis double</em> emphasis
simple again</em></p>

If i want eliminate a level of emphasis simply close the </em> and i
recover an inferior level. There is not need for a de-emphasis <dem>

<p>normal level, <em>emphasis simple, <em>emphasis double<dem> emphasis
simple again</dem></em></p>

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

In current HTML, heading levels are absolute. This mean that when you
modify the structure of any doc, e.g. simply copying and pasting a
fragment into other doc the heading structure usually change obligating to
you to retype the whole document. This is very odd whith dinamic docs and
multi-authoring and editing of docs. Absolute levels were eliminated from
next XHTML2 (in fact other approaches were using relative levels for
headings).

Instead

<h1><h2><h3>

XHTML2 (and other approaches) works

<section><h><section><h><section><h>

now i copy and paste into other doc

<h1><h1><h2><h3>

<section><h><section><h><section><h><section><h>

The XHTML structure is automatically updated, the HTML structure is not
and may be admended now to

<h1><h2><h3><h4>

Similar thoughts apply to absolute levels of emphasis.

>> > Thank you,
>> > Jonathan

I personally hate absolute levels of anything in a dynamic world as the
web is but can understand that some people prefer the contrary.

Juan R.

Center for CANONICAL |SCIENCE)





More information about the whatwg mailing list