1

Please explain what is the difference between these two lines:

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

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

Both render.

What are the benefits/drawbacks of using double quotes (") ?

unor
  • 92,415
  • 26
  • 211
  • 360
Von
  • 304
  • 3
  • 15
  • Please, this is not a duplicate question. The link to the other item explains why it is a good practice to use quotes. This one asks why double quotes instead of single quotes. I don't know the difference, but Eclipse version 2019 warns you when using single quotes for HTML attributes. – Alex8752 Sep 29 '19 at 15:16

1 Answers1

1

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

Excerpt from 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.

Community
  • 1
  • 1
Scott Smith
  • 417
  • 3
  • 11
  • Sorry, but this link explains why use quotes, it does NOT disclose why to use double quotes instead of single quotes. – Alex8752 Sep 29 '19 at 15:11