Does that mean the best way to go fro ID, Class Names, Variables, etc... is interCaps (also known as CamelCase or lowerCamelCase) ?

http://en.wikipedia.org/wiki/CamelCase

R


----- Original Message ----- From: "Ben Curtis" <[EMAIL PROTECTED]>
To: <wsg@webstandardsgroup.org>
Sent: Friday, July 08, 2005 9:07 AM
Subject: Re: [WSG] are underscores a problem



That said, I was asked if we could modify some id and class names to go from nav1sub1 to nav1_sub1 . I told them my preference would be nav1- sub1. But then I thought I should check to see if there would be any problems using an
underscore in an id or class. Is it one of the legal characters?


This topic came up a month ago. Read the archived thread for more info.

Underscores were illegal in CSS 2.0, but "legalized" in 2.1 since every browser except Netscape 4 violated that rule. Since 2.1 is a refinement of 2.0, 2.1 completely replaces 2.0 -- that is, there is no such thing as conforming to CSS 2.0, like you could conform to both HTML 4 and XHTML 1.

Hyphens are not forbidden, but are frowned on since they caused minor problems with some versions of Javascript interacting with IDs. I don't remember the specifics.

If you need to support Netscape Navigator 4.x, do not put underscores in your IDs or class names.

--

    Ben Curtis : webwright
    bivia : a personal web studio
    http://www.bivia.com
    v: (818) 507-6613




******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************




******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************

Reply via email to