Are
    s allowed inside H1?

前端 未结 5 1757
执笔经年
执笔经年 2021-01-18 09:23

I was wondering if there would be any problems if I added a list inside a H1 heading:

5条回答
  •  旧时难觅i
    2021-01-18 09:51

    Header elements like

    follow the phrasing content content model: if you wanted to follow the HTML specification to the letter, phrasing content can only contain regular text or other phrasing content. As
      elements aren't phrasing content, they're technically not allowed in

      elements.

      Your second example—placing the

      elements within
    • elements—is valid markup and would be the preferred method of combining

      and
        elements.

提交回复
热议问题