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 (“Smilie: ;) character followed by the URI itself, followed by an optional single quote (’) or double quote (“Smilie: ;) 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.

Category(s): CSS, Tips

Leave a Reply

Your email address will not be published. Required fields are marked *

 

You may 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>