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:
- iPod
- U2 iPod
- iPod Mini
- iPod Photo
- 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:
- iPod
- U2 iPod
- iPod Mini
- iPod Photo
- iPod Shuffle
block level vs. start
Let’s say I would like to turn this text into an ordered list:
- iPod
- U2 iPod
This iPod is covered in U2’s latest album colors, and contains many pre–loaded U2 songs.
- iPod Mini
- iPod Photo
- 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
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.
Similar Entries
- Drop-down list of United States, Canada, and Mexico states or provinces (1776 recent visits)
- AJAX select list issue in IE6 (405 recent visits)
- DHTML select list trouble, continued (274 recent visits)
- To-Do list and task manager web sites (288 recent visits)
- Removing static blogroll list (9 recent visits)
- Christmas list mediator (9 recent visits)
Stats
98 unique visits since August 2008
Recent Referrers (click)
- blocked order list scenario
- photos inside ordered lists
- photos inside ordered lists
- ordered list li level attribute
- ordered lists html starting at 1.1
- javascript markup html ordered list number level
- ordered list html 1.1
- ordered list levels
- ol list 1.1
- html ordered list 1.1
- <ol start=1.1>
- <ol start=1.1
- ol list 1.1
- ordered list within list html
- ordered list 1.1
- ordered list 1.1
- html ordered list with sub level
- start
- http://matthom.com/archive/200
- html ol 1.1
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.