[whatwg] Re: About XHTML 2.0

Christoph P?per wrote:
> You say that and some others share that point of view, but I (and 
> probably others) disagree. It is true that 'div' or 'class' don't 
> provide semantics directly, but they do indirectly: Everything inside a 
> 'div' belongs together somehow and everything that shares a class 
> (inside a document instance) is related to each other somehow. You 
> cannot know /how/, but /that/.

    The <div> (as well as <span>) does indeed have semantic meaning in 
that it can group things. However, in the case of replacing <hr>, I 
don't see how this semantic information can actually be used to benefit 
the user. It's certainly useless on modern browsers from a presentation 
standpoint if I turn CSS off.

> If one doesn't like
> 
>    <section><div class="foo"><p/>+</div>+</section>
> 
> for the added level in the document tree, then he might use the 
> semantically similar
> 
>    <section><p class="bar"/>+<p class="baz"/>+</section>.

   Huh?

> All paragraphs that share a perspective or language or something are 
> logically linked, they belong to one group (or class) and maybe to 
> others, too. It can make sense to express this in mark-up. Then it's 
> easy (depending on your styling language of choice) to add visual (or 
> aural) clues to make the changes in perspective (or language) visible. 
> That doesn't have to be a more or less fancy rule or pause, but may be a 
> change in font, color, sound etc.
> 
> If they are wrapped together by any element, they definitely are grouped 
> together.

    By dropping <hr>, we're forcing a situation by which the web author 
has to add structural markup that's of little or no use to him/her or 
the user. In fact, I wouldn't be surprised if web authors deprived of an 
<hr> element simply did this:

| <p>Paragraph 1</p>
| <p class="hr">* * *</p>
| <p>Paragraph 2</p>

>> An <hr> is equivalent to a <p> with the
>>content "Meanwhile, somewhere else..." or similar ("From someone else's 
>>point of view...", "At another time...").
> 
> No, it's not. You are connecting it with the succeeding element
> instance, but it's not.

    But your whole argument is that a separator is nothing more than the 
end of one section and the start of another one. Therefore, being the 
start of the next section, it's perfectly valid to render it as 
connected to the text in the next section.

> Anyhow, if it was, why wouldn't you use a 'p' with that content or an 
> empty one?

   Because you're leaving it up to the user agent to pick a 
presentation, just as you would rely on the user agent to decide how 
<em> should be presented.

>>   <p><q>No!</q> said Fred.</p>
>>   <hr>
>>   <p>The tree stood alone.</p>
>>
>>   +----------+ +--------------+-------+
>>   |  _____   | | Meanwhile... |       |
>>   | < No! >  | +--------------+       |
>>   |  \/^^^   | |         /|\          |
>>   |  o       | |         /|\          |
>>   | -+-      | |          |           |
>>   | / \      | |          |           |
>>   +----------+ +----------------------+
>>
>>my point is that the <hr> here is a unit on par with a paragraph,
> 
> So why is it rendered embedded into the box of one of the paragraphs? 
> Shouldn't it be a child of it then?

    Two elements can overlap without one being a child of the other.

>> it's not an artefact of an implied higher level grouping.
> 
> Show me the whole text, I'll show you the higher level grouping.

    Perhaps, but you force authors to identify those groupings and add 
structural markup and CSS for them when you can just stick an <hr> in 
there that will work even with the CSS turned off?

>>If we didn't have <hr>,
>>   <p>* * *</p>
> 
> Or "<p/>" or "<p><img src="fancy-divider" alt="* * *"></p>".
> Does this provide the semantics?

    No, because they lack the semantics of <hr>.

> (IMHO it does not, because 'hr' or 
> 'plot' are one level higher than the 'p', but) if so, why should we 
> retain that limited 'hr' element type, which could ambiguously be in par 
> with other elements than 'p' (as in "</section><hr><section>")?

    There's nothing about <hr> that forces you to use it. You've already 
given examples that use existing markup. In cases where you don't feel 
it should be used, don't use it.

>>I really don't think:
>>
>>    <p><q>No!</q> said Fred.</p>
>>   </plot>
>>   <plot>
>>    <p>The tree stood alone.</p>
>>
>>...would be better than <hr>,
> 
> 
> I do. (Although I'm fine with using 'div' for this.)
> 
>>in fact I think it would be unnatural from 
>>an authoring perspective.
> 
> I, on the opposite, think that it's unnatural to mark the end of one 
> thing and the start of a second, but neither the start of the first nor 
> the end of the second.

    Oh really? So you're saying that if I have some text...

| Paragraph 1
|
| Paragraph 2
|
| Paragraph 3
|
| * * *
|
| Paragraph 4
|
| Paragraph 5
|
| Paragraph 6

    ...it's more natural for an author to do this...

| <section>
|   <p>Paragraph 1</p>
|   <p>Paragraph 2</p>
|   <p>Paragraph 3</p>
| </section>
| <section>
|   <p>Paragraph 4</p>
|   <p>Paragraph 5</p>
|   <p>Paragraph 6</p>
| </section>

    ...plus the additional CSS overhead (which I'm still confused about, 
by the way) instead of this:

| <p>Paragraph 1</p>
| <p>Paragraph 2</p>
| <p>Paragraph 3</p>
| <hr>
| <p>Paragraph 4</p>
| <p>Paragraph 5</p>
| <p>Paragraph 6</p>

    But wait. Where do the sections start and end?

| <section>
|   <p>Paragraph 1</p>
| </section>
| <section>
|   <p>Meanwhile, Paragraph 2</p>
|   <p>Paragraph 3</p>
| </section>
| <section>
|   <p>Paragraph 4</p>
|   <p>Paragraph 5</p>
| </section>
| <section>
|   <p>At the same time, Paragraph 6</p>
| </section>

>> We mustn't fall into the trap of considering everything to be a
>> hierarchy, just because that is what XML most easily marks up.
> 
> I'm trying not to, but in all the alledged use cases that have presented 
> in favor of 'hr' or 'separator', I see a structure (or hierarchy), that 
> demands not a divider but a grouper.

    How so? The presentation doesn't demand grouping, it demands a 
separator. I can't think of any behavior implied by <hr>, and you don't 
provide a use case for why we need the extra grouping elements or how 
they will be used.

>>Book authors have managed quite well for centuries without
>>considering their documents to be formed of trees!
> 
> I don't think so. They're just not that much aware of it, they do it 
> subconsciously (at least the good ones).

    But creating sections in markup is NOT subconscious. I don't want to 
spend hours pondering the structure of my novel. I just want a bloody 
separator. If the structure of my writing wasn't important enough for me 
  to consider it on a conscious level, then why is it so important for 
it to be in my HTML?

Received on Tuesday, 7 June 2005 22:43:55 UTC