4 ms·
Not using quotes on tag attributes is okay for HTML provided that... refer to the standards for the complete info.
by dchest 17y ago
Not using quotes on tag attributes is okay for HTML provided that... refer to the standards for the complete info.
- martey 17y agoFrom HTML 4 (http://www.w3.org/TR/REC-html40/intro/sgmltut.html#h-3.2.2 http://www.w3.org/TR/REC-html40/intro/sgmltut.html#h-3.2.2): The attribute value may only contain letters (a-z and A-Z), digits (0-9), hyphens (ASCII decimal 45), periods (ASCII decimal 46), underscores (ASCII decimal 95), and colons (ASCII decimal 58). We recommend using quotation marks even when it is possible to eliminate them. From HTML 5 (http://www.w3.org/TR/html5/syntax.html#attributes http://www.w3.org/TR/html5/syntax.html#attributes): ...the attribute value, which, in addition to the requirements given above for attribute values, must not contain any literal space characters, any U+0022 QUOTATION MARK (") characters, U+0027 APOSTROPHE (') characters, U+003D EQUALS SIGN (=) characters, or U+003E GREATER-THAN SIGN (>) characters, and must not be the empty string.