I want to implement a list that looks like this:
Heading 1
1. Item 1
2. Item 2
Heading 2
3. Item 3
4. Item 4
Heading 3
5. Item 5
etc
I can get this working using html as follows:
which works fine from a presentation point of view but fails HTML validation which apparently objects to the fact that a <p> tag is appearing between a </li> and the next <li> tag. Does this mean that I effectively have to include the headings prior to the final </li> tag of each sub-list? This doesn't seem like a very clean solution.
Thanks in advance.
Heading 1
1. Item 1
2. Item 2
Heading 2
3. Item 3
4. Item 4
Heading 3
5. Item 5
etc
I can get this working using html as follows:
Code:
<ol>
<p>Heading 1</p>
<li>Item 1</li>
<li>Item 2</li>
<p>Heading 2</p>
<li>Item 3</li>
<li>Item 4</li>
<p>Heading 3</p>
<li>Item 5</li>
</ol>
which works fine from a presentation point of view but fails HTML validation which apparently objects to the fact that a <p> tag is appearing between a </li> and the next <li> tag. Does this mean that I effectively have to include the headings prior to the final </li> tag of each sub-list? This doesn't seem like a very clean solution.
Thanks in advance.