Here’s an HTML Tip from a Twitter Friend

Posted on November 29, 2008

For those of you designing your website on your own, here’s a tip you should always remember…Thanks Kyle:)

Important HTML Tip - Quoting HTML attribute values

This is an important HTML tip.

The values of attributes can contain text, hexadecimal color codes or numbers. In case of JavaScript event handlers, the values consist of small JavaScript code. A sincere advice for good and clean HTML coding is to ALWAYS put quotes around attribute values. It is a good habit, will save you many headaches and avoid errors especially when attribute values contain spaces.

Thus, using bgcolor=”#ffffff” instead of bgcolor=#ffffff results is greater browser compatibility and differentiates it nicely from other attribute-value pairs. Quoting attribute values is also required in XHTML. Your pages will fail the W3C validation if you leave the values haning around with the quotes.

————————————————–
Kyle Reddoch is a Web Expert located in Amarillo, TX. To learn more about him visit his website at KyleReddoch.com.

  • Share/Save/Bookmark
Share

Tags: , , ,

Leave a Reply

Follow Us...

View Toresa Slater's profile on LinkedIn
Ad Ad Ad Ad

 Flickr Photos

Find Us...

web design

Your Questions Answered: