![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Yoohoo, it's me again. How do you do large ordered lists, if you need to break them up with headings yet still have it pass validation? www.thermachek.com/temp/thelawdetail.php This is an ordered list of 53 items, a breakdown of the 53 articles in a UK law. The list is continious but broken by part headings. On validation I get an error on each "Part1" "Part2" etc item; Line 285, Column 3: document type does not allow element "H4" here; assuming missing "LI" start-tag. h4 I know what is wrong, I need to finish a list, do the heading then start a new list. So I need the new list to start an a number other than 1, where the previous list finished. The "start" property of the ol> has been deprecieated but no matching CSS has been created. |
#3
| |||
| |||
|
|
Mike Barnard <m.barnard.trousers (AT) thunderin (DOT) co.uk> wrote in news:0aocu3dkf5g3lj599rgjf2jki9lbrvfleb (AT) 4ax (DOT) com: How do you do large ordered lists, if you need to break them up with headings yet still have it pass validation? www.thermachek.com/temp/thelawdetail.php What you can do is: li>text h4>heading</h4 /li li>text</li |
#4
| |||
| |||
|
|
Mike Barnard <m.barnard.trousers (AT) thunderin (DOT) co.uk> wrote in news:0aocu3dkf5g3lj599rgjf2jki9lbrvfleb (AT) 4ax (DOT) com: Yoohoo, it's me again. How do you do large ordered lists, if you need to break them up with headings yet still have it pass validation? www.thermachek.com/temp/thelawdetail.php This is an ordered list of 53 items, a breakdown of the 53 articles in a UK law. The list is continious but broken by part headings. On validation I get an error on each "Part1" "Part2" etc item; Line 285, Column 3: document type does not allow element "H4" here; assuming missing "LI" start-tag. h4 I know what is wrong, I need to finish a list, do the heading then start a new list. So I need the new list to start an a number other than 1, where the previous list finished. The "start" property of the ol> has been deprecieated but no matching CSS has been created. Are you sure you need to restart the list? Let's see, what you have is something like this: li>text</li h4>heading</h4 li>text</li I think you understand the error. However there is another way to go about doing what you want other then closing the list, add header then restart the list. What you can do is: li>text h4>heading</h4 /li li>text</li [snip] |
#5
| |||
| |||
|
|
I know what is wrong, I need to finish a list, do the heading then start a new list. So I need the new list to start an a number other than 1, where the previous list finished. The "start" property of the ol> has been deprecieated but no matching CSS has been created. |
|
Use the deprecieated 'start' property? No validation but *may* work in more browsers? |
#6
| |||
| |||
|
|
BootNic wrote: Mike Barnard <m.barnard.trousers (AT) thunderin (DOT) co.uk> wrote in news:0aocu3dkf5g3lj599rgjf2jki9lbrvfleb (AT) 4ax (DOT) com: How do you do large ordered lists, if you need to break them up with headings yet still have it pass validation? www.thermachek.com/temp/thelawdetail.php What you can do is: li>text h4>heading</h4 /li li>text</li That doesn't look very logical. |
|
If the list number really does need to resume on each list, it may be better to use the deprecated start attribute on the <ol> than resort to incorrect markup just to please the validator. |
|
Validated code is not an end to itself, though some people seem to think it is. A nested list would be correct, too, I think. Like a table of contents. ol li><hx>Section heading</hx ol start="1" li>... Looking at the page in question, though, I wonder what harm there is in letting the lists restart numbering at 1. |
#7
| |||
| |||
|
|
On Sun, 23 Mar 2008 14:22:29 -0500, Bergamot <bergamot (AT) visi (DOT) com wrote: If the list number really does need to resume on each list, it may be better to use the deprecated start attribute on the <ol> than resort to incorrect markup just to please the validator. Are there any browsers that ignore this deprecieated term, |
|
or wil it kick in to quirks mode? |
|
Looking at the page in question, though, I wonder what harm there is in letting the lists restart numbering at 1. It's a legal document that continues 1 to 53. |
#8
| |||
| |||
|
|
On Sun, 23 Mar 2008 14:22:29 -0500, Bergamot <bergamot (AT) visi (DOT) com> wrote: Are there any browsers that ignore this deprecieated term, or wil it kick in to quirks mode? Dunno. |

#9
| |||
| |||
|
|
If it's valid in quirks mode, |
|
Quirks mode is only triggered by the doctype, not by anything else in the markup. |
|
It's a legal document that continues 1 to 53. OK, then I suggest using what makes sense for your particular document, not just what the validator wants. |
#10
| |||
| |||
|
|
How do you do large ordered lists, if you need to break them up with headings yet still have it pass validation? |
![]() |
| Thread Tools | |
| Display Modes | |
| |