Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap

Q2022 When should I use Quotes in my tags?

You are here: irt.org | FAQ | HTML | Q2022 [ previous next ]

Quotes should be used in values of attributes (anything after an = within a tag), unless the value is a number combination(0-9), a letter (a-z, A-Z) or one of a few symbols (-, .). All URLs should be encased in quotes, example:

<A HREF="http://www.hwg.org/">The HTML Writers Guild</A>

As should any color references, example:

<BODY BGCOLOR="#000000">

ALT attributes should be quoted, especially if they have any spaces, example:

<IMG SRC="graphic.gif" ALT="Whatever you want here"> 

Anytime a non-allowed character is used, quotes are needed. Not using quotes can come up with unreliable rendering. BUT (there always is a but), you may use quotes on any and all values without any adverse effects. So, when in doubt, quote :)

Feedback on 'Q2022 When should I use Quotes in my tags?'

©2018 Martin Webb