Is header in legend valid?

Caption

前端 未结 7 1187
萌比男神i
萌比男神i 2021-01-17 21:20

I use this in visual studio but the compiler claimed that h1 cannot be nested in legend element, but browser can render it anyway so i am confused

7条回答
  •  不思量自难忘°
    2021-01-17 21:43

    if you check the html standards it says:

    
    

    The %inline part means that it should only contain character level elements and text strings. So while it does render, you should not use it this way because the html is actually not valid.

提交回复
热议问题