search engine optimization articles do it yourself seo hiring search engine experts html and search engine optimization web site analysis and submission service

HTML Help: Attribute Quotation Marks

In some HTML tutorials they show code examples using quotes around attribute values but other tutorials don't use quotes. Which is the right way to do it?
Some attributes allow for omitting the quotation marks around the attribute value, but it's a good idea to make a habit of always including them.

In XHTML, all attribute values must be enclosed in quotation marks. If a later version of HTML requires quotation marks and you want to upgrade your code, you'd have to go back through every page and put add in the quotations marks.

It's easier to form a good habit now by always including them. You'll never be wrong by using them. If you make a habit of always including them you'll be less likely to leave them off where they are required.

Best Practice:

<element attribute="value">

This concludes the

HTML Help about using quotation marks around attribute values

. Based on your interest in this FAQ, you might also be interested in my 4-part Introduction to HTML, or more specifically, the Attributes and Values Tutorial.
Back | HTML FAQ | HTML Tag Chart | HTML Index | Web Design Tutorials
search engine optimization course
If you want your web site to rank high in the search engines . . . what are you going to do to get it there? Check out my search engine optmization guide, SEO for YOU: Search Engine Optimization for Ordinary Everyday People!

Check out SEO for YOU now!

Almost a Newsletter

Subscribe today for exclusive website design tutorials and grab some free gifts to boot! Learn more, or subcribe below:

First Name:

Privacy Policy

Did you know...

The member's site has about 100 standards compliant HTML and CSS tutorials, 31 handy reference charts, reprintable content, web graphics, exclusive fonts, free software, free ebooks and more? All this for less than 9 cents a day! [ Details ]
See my fancy bottom! :)