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

[whatwg] <CENTER>, <MENU>, <DIR>, <NL>

From: James Graham <jg307@cam.ac.uk>
Date: Tue, 17 Jan 2006 18:49:57 +0000
Message-ID: <43CD3C55.2010002@cam.ac.uk>
Eugene T.S. Wong wrote:
> Hi all.
> 
> Here is an example that I'm working on now. I'm trying to make a 
> flyer/brochure to hand out to businesses after talking to them. I hope 
> that they will consider giving me merchandise to use as prizes for a 
> poker club that I'm trying to start. There is absolutely no intent for 
> me to post this on the web. I may do that in the future, but definitely 
> not in the foreseeable future. The content is changed, but hopefully 
> it'll make sense.
> 
> <CENTER>Marketing Opportunity</CENTER>
> 
> <DIV><H1>What I Want To Do</H1>
> <P>content describing poker club that I'm trying to set up...lorem 
> ipsum...</P>
> </DIV>
> 
> <DIV><H1>What I Would Like You To Do</H1>
> <P>content describing what I'm asking the businesses to do and how I 
> intend to give them value for giving me their products or gift 
> certificates to be used as prizes...lorem ipsum...</P>
> </DIV>
> 
> <DIV><H1>Misc. Info</H1>
> <UL>
> <LI>location</LI>
> <LI>time</LI>
> </UL>
> </DIV>
> 
> <ADDRESS>
> <UL>
> <LI>my name</LI>
> <LI>my contact info</LI>
> </UL>
> </ADDRESS>
> 
> [note: I admit that my coding style may be unusual]
> 
> The example is overkill to demonstrate just 1 line of code, but I want 
> to strongly emphasize through demonstration that <CENTER> is used very 
> sparingly and only on specific locations. In this case, it is used as a 
> title.
> 
> I refuse to use <H1> as a title, based on my own principles that there 
> can be only 1 title, just as there can be only 1 document root. There 
> can be multiple headings, but not mulitiple titles for each document.

Your principles differ from the HTML spec. If you refuse to use elements 
in the correct way then it's not too surprising when you encounter 
problems. The correct markup for the above document is something like:

  <h1>Marketing Opportunity</h1>

  <h2>What I Want To Do</h2>
  <p>content describing poker club that I'm trying to set up...lorem
  ipsum...</p>

  <h2>What I Would Like You To Do</h2>
  <p>content describing what I'm asking the businesses to do and how I
  intend to give them value for giving me their products or gift
  certificates to be used as prizes...lorem ipsum...</p>

  <h2>Misc. Info</h2>
  <ul>
  <li>location</li>
  <li>time</li>
  </ul>

(I've omitted the <div> elements for clarity but it doesn't really 
matter either way. In HTML5 you would add additional <section> elements 
that wrapped both the headings and the content).

The centring of the main heading can then be achieved using CSS. The 
advantage of this structure is that it helps any UA with some 
understanding of heading elements to present a logical view of the 
document. For example Firefox users can add this capability using my 
Document Map extension [1]. I would also expect other types of UA such 
as search crawlers and aural UAs to take advantage of this information.

[1] 
https://addons.mozilla.org/extensions/moreinfo.php?application=firefox&category=Developer%20Tools&numpg=10&id=475

-- 
"It seems to be a constant throughout history: In every period, people 
believed things that were just ridiculous, and believed them so strongly 
that you would have gotten in terrible trouble for saying otherwise."

-- http://www.paulgraham.com/say.html
Received on Tuesday, 17 January 2006 10:49:57 UTC

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