I was interested to know what is the difference between quoted and unspecified attributes in css selectors and whether this affects performance.
input[type="text"]
/
input[type=text]
Thanks in advance
The above are the same. Quotation marks are optional for identifiers , but should be used when it is a string .
Some common string examples include:
0-9
Here is the complete identifier specification :
CSS ( , ) [a-zA-Z0-9] ISO 10646 U + 00A0 , (-) (_); , , . ISO 10646 (. ). , "B & W?" "B\& W \?" "B\26 W\3F".
: http://www.w3.org/TR/css3-selectors/#attribute-selectors