How to semantically add heading to a list

后端 未结 8 1930
借酒劲吻你
借酒劲吻你 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:59

    Your first option is the good one. It's the least problematic one and you've already found the correct reasons why you couldn't use the other options.

    By the way, your heading IS explicitly associated with the

      : it's right before the list! ;)

      edit: Steve Faulkner, one of the editors of W3C HTML5 and 5.1 has sketched out a definition of an lt element. That's an unofficial draft that he'll discuss for HTML 5.2, nothing more yet.

提交回复
热议问题