In XHTML 1.0 Strict do attribute values need to be surrounded with quotes?

后端 未结 2 553
猫巷女王i
猫巷女王i 2021-01-20 17:42

In XHTML 1.0 Strict do attribute values need to be surrounded with quotes?

Example:


A

2条回答
  •  無奈伤痛
    2021-01-20 18:32

    Yes, all attributes must be quoted, and yes, attributes can use single or double quotes. Just be consistant—don't open an attribute with a single quote and close with a double quote. And also, you should leave a space between the closing slash and the last attribute of self-closing tags, to keep compatibility with old browsers, as so:

    
    

提交回复
热议问题