This was deprecated in HTML 4.01 Strict, but is back in the specs in HTML 5.

PaulOB
—
2011-06-06T20:24:15Z —
#3

Hi,

You can't break up a list structure like that with divs as that is not allowed. Nothing can come between the ol or ul except a list pair. All content must be within the opening and closing list tags (even nested lists).

I don't see that your inner content should be an unordered list either and it looks more like a heading and content (or maybe a nested dl).

That uses the method that Stevie mentioned as I don't see any other way to do it for older browsers (you could use counters etc for newer browsers).

Stomme_poes
—
2011-06-07T08:09:07Z —
#4

I've noticed that Jakob Nielsen's page uses the deprecated "start" attribute, and it works in more browsers than the counters().

Stevie_D
—
2011-06-07T11:35:25Z —
#5

Stomme_poes said:

I've noticed that Jakob Nielsen's page uses the deprecated "start" attribute, and it works in more browsers than the counters().

The start attribute is one of those features that should never have been deprecated in the first place. Counters are too poorly supported to be relied on, and too complicated for simple deployment. <ol start="x"> is simple, straightforward and more-or-less fully supported.

system
—
2011-06-07T14:59:25Z —
#6

Also start is actually more semantic if you think about it, the numbers of an OL are as much content as anything else...

Though yeah, that's laughable -- you can't put div in a OL that way... the only elements that can be direct children on a OL or UL are LI.

Though you see people trying to do that sort of nonsense all the time.

LoveFest
—
2011-06-13T21:34:30Z —
#7

Stevie_D said:

<ol start="4">

This was deprecated in HTML 4.01 Strict, but is back in the specs in HTML 5.

Nice!

Paul_O_B said:

Hi,That uses the method that Stevie mentioned as I don't see any other way to do it for older browsers (you could use counters etc for newer browsers).

What kind of counters? Javascript?

system
—
2011-06-14T02:07:05Z —
#8

LoveFest said:

What kind of counters? Javascript?

Or build them in the markup if the content is generated server side.

Sometimes making them in the content is a better choice for some visual stylings as you can better control their appearance in CSS than you can the normal elements for list-items. The problem being that CSS on if you use OL you'll get two sets of numbers.

-- edit -- scratch the rest of that.

system
—
2011-06-14T02:16:20Z —
#9

Oh, there is one other way this could be done, but I hesitate to mention it due to it's complexity.