CSS Tip 2 : Quotes are optional in URL

The format of a URI value is ’url(’ followed by optional white space followed by an optional single quote (’) or double quote (“) character followed by the URI itself, followed by an optional single quote (’) or double quote (“) character followed
by optional white space followed by ’)’. The two quote characters must be the same.
Example(s):
An example without quotes:

li { list-style: url(http://www.example.com/redball.png) disc }
body { background: url("http://www.example.com/pinkish.png") }

Both are valid quotes are optional in url.

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>