Self-closing tags (void elements) in HTML5

前端 未结 5 417
不知归路
不知归路 2020-11-28 12:10

Step 6 of 8.1.2.1 Start tags of the HTML5 spec says that void elements may have a single / character. I think this is so it\'s easier to migrate sites

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-28 12:21

    Closing the tag with a slash is a more explicit way of denoting that it is not meant to have a closing tag.

提交回复
热议问题