The HTML5 standard does not require quotes around attribute values.
PragatiVerma18 opened this issue · 2 comments
Code Guide reads:
Always use double quotes, never single quotes, on attributes.
However, HTML5 standards say that attributes can be written even without quotes, but it should be mentioned that they are recommended because of stricter languages like XHTML demand quotes.
Sometimes it is necessary to use quotes. This example will not display the title attribute correctly, because it contains a space:
<p title=About W3Schools>
Double quotes around attribute values are the most common in HTML, but single quotes can also be used.
In some situations, when the attribute value itself contains double quotes, it is necessary to use single quotes:
<p title='John "ShotGun" Nelson'>
Or vice versa:
<p title="John 'ShotGun' Nelson">
Right, the point here is for consistency and predictability. Closing as a won't fix.