Ordered list scenarios Feb27 '05

While exporting a Pages document to HTML, I noticed that <ol> has an attribute start. I had not known this up until this point.

The start attribute let’s the author specify what list number is used to begin the increment. For example:

<ol>
<li>iPod</li>
<li>U2 iPod</li>
<li>iPod Mini</li>
<li>iPod Photo</li>
<li>iPod Shuffle</li>
</ol>

... would output:

  1. iPod
  2. U2 iPod
  3. iPod Mini
  4. iPod Photo
  5. iPod Shuffle

However...

<ol start="3">
<li>iPod</li>
<li>U2 iPod</li>
<li>iPod Mini</li>
<li>iPod Photo</li>
<li>iPod Shuffle</li>
</ol>

... would output:

  1. iPod
  2. U2 iPod
  3. iPod Mini
  4. iPod Photo
  5. iPod Shuffle

block level vs. start

Let’s say I would like to turn this text into an ordered list:

  1. iPod
  2. U2 iPod

This iPod is covered in U2’s latest album colors, and contains many pre–loaded U2 songs.

  1. iPod Mini
  2. iPod Photo
  3. iPod Shuffle

Notice the brief description of the U2 iPod.

How would you markup this list, in HTML?

Would you simply imbed another block level element within the list item, such as:

<ol>
<li>iPod</li>
<li>U2 iPod

<blockquote><p>This iPod is covered in U2’s latest album colors, and contains many pre–loaded U2 songs.</p></blockquote>

</li>
<li>iPod Mini</li>
<li>iPod Photo</li>
<li>iPod Shuffle</li>
</ol>

Or... would you utilize the start attribute:

<ol>
<li>iPod</li>
<li>U2 iPod</li>
</ol>

<blockquote><p>This iPod is covered in U2’s latest album colors, and contains many pre–loaded U2 songs.</p></blockquote>

<ol start="3">
<li>iPod Mini</li>
<li>iPod Photo</li>
<li>iPod Shuffle</li>
</ol>

My preference

I prefer using the block level element inside the list item.

Categories: Markup , Semantics , XHTML

Add Feedback (view all)

Leave feedback

Feedback

Input format: The editor controls below will assist with Markdown syntax.

Status

Sub-status

Your info

Good, because apparently the start attribute has been deprecated in XHTML 1.1. Someone on the WSG mailing list pointed this out last year, citing ... Read more.

matthom is published and produced by Matt Thommes - an independent publishing enthusiast, mobile blogger, content creator, informative writer, web developer from a suburb of Chicago. Never one to conform, Matt intends to promote the effect the web has on our lives, in an effort to intensify, instruct, and clarify all that is happening around us.

Contact Matt

Popular Pages

  1. Fast rounded corners in Photoshop (5892 recent visits)
  2. PHP – passing variables across pages (2153 recent visits)
  3. JavaScript set selected on load (1806 recent visits)
  4. Removing all child nodes from an element (1256 recent visits)
  5. iPod songs out of order? (1047 recent visits)
  6. Firefox 3 smart address bar: wildcard search (968 recent visits)
  7. Britney - Everytime piano tab (902 recent visits)
  8. MySQL LEFT JOIN syntax (758 recent visits)
  9. Breathe Me - Sia (678 recent visits)
  10. Tumblr: how blogging should be (559 recent visits)

Similar Entries

Stats

25 unique visits since August 2008

Syndicate

Advertisements