I\'ve always thought html requires quotation marks in his properties:
Always use quotation marks. I don't believe that HTML properties without quotation marks are classed as Invalid HTML, but they will potentially cause you problems later on down the line. By default, SGML requires that all attribute values be delimited using
either double quotation marks (ASCII decimal 34) or single quotation
marks (ASCII decimal 39). Single quote marks can be included within
the attribute value when the value is delimited by double quote marks,
and vice versa. Authors may also use numeric character references to
represent double quotes (") and single quotes ('). For double
quotes authors can also use the character entity reference ". In certain cases, authors may specify the value of an attribute
without any quotation marks. 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. Source: http://www.w3.org/TR/REC-html40/intro/sgmltut.html#h-3.2.2 I think they're a great way of clearly defining when an attribute value starts and finishes. Take for example the This clearly shows the browser that my classes are Take away the quotation marks and we've got: A browser could now interpret this as 3 classes, with no id. Or it may even interpret it as 3 attributes. (Even stackoverflow's syntax styling is struggling with this one!)
class
attribute which can have multiple classes seperated by spaces:classa
and classb
, with an element id of 123
.classa
, classb
and id=123
.class="classa"
, classb=""
and id="123"