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 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

Similar Entries

Stats

98 unique visits since August 2008

Syndicate

Advertisements