How to semantically add heading to a list

后端 未结 8 1910
借酒劲吻你
借酒劲吻你 2020-12-04 10:23

This has been bothering me for a while, and I\'m wondering if there\'s any consensus on how to do this properly. When I\'m using an HTML list, how do I semantically include

8条回答
  •  粉色の甜心
    2020-12-04 10:58

    As Felipe Alsacreations has already said, the first option is fine.

    If you want to ensure that nothing below the list is interpreted as belonging to the heading, that's exactly what the HTML5 sectioning content elements are for. So, for instance you could do

    About Fruits

    Fruits I Like:

    • Apples
    • Bananas
    • Oranges

提交回复
热议问题