Is it necessary to enclose a call to the css file into quotes?
This question already has an answer here:
I believe the spec defines it to have quotes, but some browsers go beyond and will know what you meant.
EDIT : I was wrong! From the spec
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 space characters 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.
http://www.w3.org/html/wg/drafts/html/master/introduction.html#restrictions-on-content-models-and-on-attribute-values
In HTML5 you don't need to use quotes for any attributes. But, sometimes you have to because of knowing where a string ends. In HTML4.1 and XHTML you have to use quotes.
It's a good practice to use quotes anyway, even if you don't need them.
链接地址: http://www.djcxy.com/p/15432.html上一篇: OS X终端颜色