Forum Moderators: not2easy

Message Too Old, No Replies

CSS and Case Sensitivity

for css code

         

seashell

2:51 pm on Sep 23, 2003 (gmt 0)

10+ Year Member



I type all my HTML tags in capital. Out of habit, most of my css code is capitalized also.

Example

P {TEXT-ALIGN: center; FONT-WEIGHT: 700; }

I recently read somewhere that css code should be in lowercase. Does it matter? All my code works, so as far as I know it doesn't.

drbrain

4:11 pm on Sep 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



lowercase, it is more compressible by gzip if you're using content-encoding.

Although be aware that class and id names are case sensitive, and element names are case-sensitive depending upon document markup language (HTML is not, XML/XHTML is).

seashell

4:52 pm on Sep 23, 2003 (gmt 0)

10+ Year Member



Yes, I forgot to mention that. I use lowercase for all classes. Thanks for the advice!