A fable ...

J

Joe

I was spouting off the other day, telling someone the "right" (alt.html
approved) way of doing a navigation menu. The conversation went like
this:
ME: '... so your navigation menu is really a list of links and you
should mark them up like that'
THEM: '???'
ME: 'Like in a book, you have the contents page at the front, directing
you to where you want to go.'
THEM: 'Oh, you mean the "Table of Contents" '
ME: (cleverly seeing the trap and deftly avoiding it) 'Sort of, but on
the web, it's more like a menu at a restaurant.'
THEM: 'So how would you mark up a restaurant menu then?'
ME: (thinks)'Bugger'

Can someone supply me with a happy ending?
 
J

Jonathan N. Little

Joe said:
I was spouting off the other day, telling someone the "right" (alt.html
approved) way of doing a navigation menu. The conversation went like
this:
ME: '... so your navigation menu is really a list of links and you
should mark them up like that'
THEM: '???'
ME: 'Like in a book, you have the contents page at the front, directing
you to where you want to go.'
THEM: 'Oh, you mean the "Table of Contents" '
ME: (cleverly seeing the trap and deftly avoiding it) 'Sort of, but on
the web, it's more like a menu at a restaurant.'
THEM: 'So how would you mark up a restaurant menu then?'
ME: (thinks)'Bugger'

Can someone supply me with a happy ending?

Menus is usually tabular data with two columns, the entrée and the
price, hence a *table*. Your navigation menu is more like a shopping
*list* with just a *list* of links to pages on your site.
 
L

Leif K-Brooks

Joe said:
THEM: 'So how would you mark up a restaurant menu then?'
ME: (thinks)'Bugger'

Can someone supply me with a happy ending?

How about:

<h#>Soups</h#>
<dl>
<dt>Human heart soup ($149.99)</dt>
<dd><p>Perfect for the hardcore cannibal. The broth is blood.</p></dd>
<dt>Vegetable soup ($3.99)</dt>
<dd><p>Is the spinach contaminated with E. coli? Only one way to find
out!</p></dd>
</dl>

<h#>Entrees</h#>
<dl>
<dt>Greabeadle ($49.99)</dt>
<dd><p>A great dane stuffed with a beagle stuffed with a poodle. The
perfect feast!</p></dd>
<dt>Road kill ($14.99)</dt>
<dd><p>It's pretty decomposed, but we think it might be a raccoon.</p></dd>
</dl>
 
A

Andy Dingley

Joe said:
I was spouting off the other day, telling someone the "right" (alt.html
approved) way of doing a navigation menu.

RDF still gets this right and HTML 3.2 used to, until HTML 4 deprecated
it.

There are three container structures, which in RDF terms are Bag, Alt
and Seq.

A "bag" (an old Smalltalk term) contains a collection of things, and
that's all it really means. You can have anything in there, and you can
have more than one of each type (so it's unlike a Set). There's no
ordering.

A Seq (sequence) is like a bag, but has ordering too.

An Alt contains a set of distinct items and one is selectable from
within this list.

There's a little wooliness between these terms if you compare them
between different languages. Some see "identity" and uniqueness as
being dependent on type, others on instance. Can you put two different
objects of the same type into a set ?

In HTML terms, Bag is analogous to <ul>, Seq to <ol> and Alt to the
now-deprecated <menu>. IMHO, deprecating <menu> was an error in HTML
4 -- it's not the same thing as <ul> and it was also a useful semantic
distinction to make clear at the HTML level.
 
J

Joe (GKF)

Menus is usually tabular data with two columns, the entrée and the
price, hence a *table*. Your navigation menu is more like a shopping
*list* with just a *list* of links to pages on your site.
Nice one.
 
J

Joe (GKF)

In HTML terms, Bag is analogous to <ul>, Seq to <ol> and Alt to the
now-deprecated <menu>. IMHO, deprecating <menu> was an error in HTML
4 -- it's not the same thing as <ul> and it was also a useful semantic
distinction to make clear at the HTML level.
yes. I thought I was the only person who mourned the passing of "menu".
It still *works* of course, but I feel guilty if I use it.
 
A

Andy Dingley

Joe said:
yes. I thought I was the only person who mourned the passing of "menu".
It still *works* of course, but I feel guilty if I use it.

It works very nicely on some mobile devices with physical buttons and
dedicated display screen space for them, where a hardware-aware browser
can render the title onto / adjacent to the physical button.

You can do the same by inferring it from id or class values, but that's
dubious.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,017
Latest member
GreenAcreCBDGummiesReview

Latest Threads

Top