Ordered lists and standards-compliant code

J

Jim Royal

What is the most efficient way to code a list of steps such as this:

1. Click Start > Run.

A dialog box appears.

2. Type "cmd" and click OK.

A command prompt widow appears.


The problem is the line of text that describes the reaction to each
step. I'm having trouble figuring out the best way to tackle it in a
standards-compliant way.

In HTML 4 Strict / XHTML, it is illegal to put a <p> inside an <ol>. So
that method is out.

I tried something like this:

<li style="list-style-type:none">A dialog box appears.</li>

This works well. However, in user agents that do not handle this
property (or in browsers from which I have hidden my style sheet), the
numbering reappears in the list, rendering the procedure unreadable.

I could close the <ol> and restart it with the appropriate number, but
that would be ridiculous -- I might as well hand-number the steps.

Ideas?
 
R

rf

Jim Royal said:
What is the most efficient way to code a list of steps such as this:

1. Click Start > Run.

A dialog box appears.

2. Type "cmd" and click OK.

A command prompt widow appears.


The problem is the line of text that describes the reaction to each
step. I'm having trouble figuring out the best way to tackle it in a
standards-compliant way.

In HTML 4 Strict / XHTML, it is illegal to put a <p> inside an <ol>. So
that method is out.

I tried something like this:

<li style="list-style-type:none">A dialog box appears.</li>

This works well. However, in user agents that do not handle this
property (or in browsers from which I have hidden my style sheet), the
numbering reappears in the list, rendering the procedure unreadable.

I could close the <ol> and restart it with the appropriate number, but
that would be ridiculous -- I might as well hand-number the steps.

Ideas?

<br>?

Cheers
Richard.
 
R

rf

Jim Royal said:
What is the most efficient way to code a list of steps such as this:

1. Click Start > Run.

A dialog box appears.

2. Type "cmd" and click OK.

A command prompt widow appears.


The problem is the line of text that describes the reaction to each
step. I'm having trouble figuring out the best way to tackle it in a
standards-compliant way.

In HTML 4 Strict / XHTML, it is illegal to put a <p> inside an <ol>. So
that method is out.

It's illegal to put a <p> inside an <ol> but it's quite permissible to put
one inside a <li>.

http://users.bigpond.net.au/rf/test/ol.html validates to strict.

Cheers
Richard.
 

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,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top