It is invalid HTML to use the "h1" HTML tags within "ol" or "ul" tags as below.

<ol>
<h1>Title 1</h1>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
<h1>Title 2</h1>
<li>List item 4</li>
<li>List item 5</li>
</ol>

It displays in your browser as below.

    Title 1

  1. List item 1
  2. List item 2
  3. List item 3
  4. Title 2

  5. List item 4
  6. List item 5

However since using "h1" in "ol" is invalid HTML, your browser may show it totally different from how it looks in IE5. IE5 would show the Titles and shows the List Items automatically numbered consecutively from 1 to 5.

Some browsers might not display the Titles at all since they are invalid HTML within "ol" tags. That is why it is bad to use invalid HTML.

However, it is not quite possible to get the automatically numbered tags with totally valid HTML using E2 HTML tags, since attributes to "ol" tags are stripped out. Otherwise, the valid HTML work around would be to have two separate list with the second list starting with number 4.

See also: The HTML Metanode, E2 HTML tags

Log in or register to write something here or to contact authors.