You are here: Re: quotes in class/id names « HTML « IT news, forums, messages
Re: quotes in class/id names

Posted by richard on 12/18/07 16:12

On Tue, 18 Dec 2007 11:04:35 -0500, Harlan Messinger
<hmessinger.removethis@comcast.net> wrote:

>richard wrote:
>> are the quotes in like class="name" absolutely necessary?
>
>In XHTML, yes. In HTML, not if the name consists of only letters,
>digits, underscores, hyphens, periods, and colons.
>
>But it's still good practice to use them. It makes your code more
>readable, because inconsistency makes code more difficult to read. You
>*will* need quotes, for example, for URLs that contain slashes, text
>field values that include spaces, and so forth. It also makes the code
>easier to write: you don't have to keep thinking, for each attribute,
>"Wait, can I get by without quotes on this one?" It's more flexible
>because, for example, you can use multiple classes as in
>class="thisclass thatclass" without making them a special case.
>
>Besides, why would you want to omit them?

Just curious. I've run a page I'm working on through the validator and
it doesn't seem to care about that.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация