How well will it be to use the <h1> header for the <ul> list. For example, like this:

 <ul><h1>Заголовок</h1> <li>1</li> <li>2</li> <li>3</li> </ul> 

It works as it should, but in terms of syntax and logic, is it appropriate to use headings in this way?

  • It is impossible, inside the ul can only li - andreymal

1 answer 1

This is not to be done, because this code will not be valid.

The W3C Validator will say this is a mistake:

Error: Element h1 ultr in this context. (Suppressing further errors from this subtree.)

  • then you just need to write <h1> to <ul> and just like that? - Tyler Maning
  • one
    @TylerManing is true, because the structure ul > li like a single logical unit. - lexxl
  • I understood, thank you for your help) - Tyler Maning