List Header lh?

In the past i always did put the heading above the list and it looks like most people do it that way:

<h2>List</h2>
<ul>
  <li>car</li>
  <li>cat</li>
  <li>dog</li>
</ul>

I thought about if


<ul>
  <h2>List</h2>
  <li>car</li>
  <li>cat</li>
  <li>dog</li>
</ul>

would be the right way.

And stumbled over the lh tag the first time.
Never saw it before in a book or article and wonder.
If there is this tag, why it is not much in use?


<ul>
  <lh><h2>List</h2></lh>
  <li>car</li>
  <li>cat</li>
  <li>dog</li>
</ul>

Sure you can wrap a section around the list in html5, but that is extra markup.

The LH was thought about in a HTML 3.0 Draft around 1995, but never made the Recommendations so don’t use it.

Generally the first version you wrote makes most sense. Since the H2 is introducing a list of 3 items. The second one is INVALID. Though I suspect you meant wrap the H2 in a LI element, which although that would be valid normally it’s not considered good practice.

Yes, stick with the first version. Much better. :slight_smile: