Discussion

Sign in or Join to comment or subscribe

Adam Stacoviak

Adam Stacoviak

Houston, TX

Founder and Editor-in-Chief of Changelog. Hacker to the heart.

2019-02-18T19:09:00Z ago

Whoa — have I been asleep at the wheel? Are quotes on attributes in HTML not required now?

Jerod Santo

Jerod Santo

Omaha, Nebraska

Jerod co-hosts The Changelog, crashes JS Party, and takes out the trash (his old code) once in awhile.

2019-02-18T19:13:34Z ago

Yeah, it’s been like that for awhile but you don’t see it in use all that much because you can’t use spaces, which are common for applying multiple classes (for example). The spec states:

Attributes are placed inside the start tag, and consist of a name and a value, separated by an = character. The attribute value can remain unquoted if it doesn’t contain spaces or any of “ ’ ` = < or >. Otherwise, it has to be quoted using either single or double quotes. The value, along with the = character, can be omitted altogether if the value is the empty string.

0:00 / 0:00