why
and not
?

前端 未结 13 1075
天涯浪人
天涯浪人 2020-12-29 05:29

This is one of those things that you read once, say \"aha!\" and then forget. Exactly my case.

Why is the line-break tag in xhtml preferentially written with a space

13条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-29 05:46

    w3c specifies this as the grammar:

    EmptyElemTag       ::=      '<' Name (S Attribute)* S? '/>'
    

    That means open bracket, a name, a number of (space and attribute) tokens, an optional space, a slash, and an end tag. According to this, both are correct.

提交回复
热议问题