Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q2022 When should I use Quotes in my tags?

irt.org | Knowledge Base | HTML | Q2022 [ previous next ]

Q2022 When should I use Quotes in my tags?

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?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.