为什么我们要在 html 输入标签属性值中使用双引号?

Why should we use double quotes inside html input tag attribute values?

请解释这两行之间的区别:

 <input type="text" size="10" maxlength="10" name="zip" value="95131" /> 

 <input type=text size=10 maxlength=10 name=zip value=95131 />

两者都渲染。

使用双引号(")有什么benefits/drawbacks?

http://www.w3schools.com/html/html_attributes.asp

摘自link:

We Suggest: Always Quote Attribute Values

The HTML5 standard does not require quotes around attribute values.

W3C recommends quotes in HTML4, and demands quotes for stricter document types like XHTML.

Sometimes it is necessary to use quotes.