[whatwg] Presentational elements in Web Applications 1.0

Eugene T.S. Wong wrote:
> On Tue, 17 Jan 2006 11:00:18 -0800, James Graham <jg307 at cam.ac.uk> wrote:
> 
>> Accepting mpt's argument for a moment, what is the semantic equivalent  
>> of <center> or <big>?
> 
> <CENTER> would be the equivalent of <SECTION> or <DIV>.

   First of all, <center> has an obviously presentational name that has
been used in previous pages specifically for centering text. This alone
encourages non-semantic use. Secondly, if it's nothing more than a
<section> or <div> with a specific presentation, there's little point in
having it because the semantics are already covered. Remember that the
user agent defines the default presentation for an element, not HTML. If
I want <center> to left justify text by default in my browser, I can do
that. To require otherwise tampers with the very semantic underpinnings
of HTML.

   I'm sure you're going to point out that <i> and <b> are
presentational, but take a look at the HTML 4.01 spec...

(http://www.w3.org/TR/html4/present/graphics.html#edef-B)
| Rendering of font style elements depends on the user agent. The
| following is an informative description only.

   Right now a user agent can present <i> and <b> however it wants, even
though they clearly imply a presentation.

   Not also that we could just as easily bring back the |align|
attribute and use it for exactly the purpose you suggest. In fact, it
would be better because you could use it on multiple elements. (In fact,
HTML 4.01 defines <center> as being a short hand for <div
align="center">.) But then, why not just do this?...

| <div style="text-align: center"></div>

>> I suppose <big> is a bit like <h1> but surely we could just reintroduce  
>> <font> and be done with it?
> 
> Well, font would have been used within good semantic markup, without CSS,  
> whereas what I am proposing is to use it with CSS. So, with the old way,  
> using <FONT> means extra markup, most likely with no extra semantics. With  
> my suggested way, there would be the same amount of elements as well made  
> documents, and less markup than what is [practiced] now by experts.

   No, it sounds to me like people would just find old tutorials on
<center> that are outdated markup and copy the code. Then we'd have to
deal with people using a bunch of deprecated markup all over again. That
doesn't reduce the amount of markup.

>> I mean, they load slower, usually use <font> tags instead of headings,  
>> which reduces the readability and accessibility of the page and  
>> generally have a negative impact.
> 
> Yes, generally.
> 
> However, just for the record, standards compliant pages don't  
> automatically load faster.

   While a poorly written standards compliant page can be quite bloated,
a well written one will almost always load faster relative to the amount
of semantic information it contains.

>> Whilst it is not implausible that a few select presentational elements  
>> may improve the overall correct use of meaningful elements on the web,  
>> history suggests that providing a raft of graphical presentational  
>> elements at the markup-language level encourages the use of poor-quality  
>> markup.
> 
> I agree with you on this.
> 
> However, I'd much rather that the non-experts misuse the non-semantic  
> markup, than the semantic markup. An entire society can't even speak 1  
> language consistently, let alone mark it up semantically.

   Clearly, <center> does not encourage use of semantic markup in cases
where semantic markup is more appropriate, though. For instance, I
believe you gave an example where you were using <center> and a series
of <h1> elements in a situation where <h1> and a series of <h2> elements
would have been more appropriate. People would simply start using
<center> for headers, paragraphs and other things, especially on user
agents where the presentation is identical or nearly identical.

Received on Tuesday, 17 January 2006 14:48:11 UTC