Link to home
Start Free TrialLog in
Avatar of panrob
panrob

asked on

Case Sensitivity

Aside from list TYPE attributes (OL TYPE="a") what are some examples of when HTML programmer's should be aware of case sensitivity?

I know that the use of Java applets is one area are there some other examples?

Are there some readability standards for putting some code elements in upppercase and others in lowercase?
Avatar of webwoman
webwoman

xhtml/xml requires tags in lowercase. Some servers (actually a lot of them) are case sensitive for file names. Javascript is case sensitive -- for some things, not for others.

To maintain compatibility going forward, it's safest to use lowercase for HTML tags, the required case for javascript, and lowercase for filenames. It also makes it a lot easier when you're debugging. Since it doesn't apply to everything, having an error come up because of a misplaced upper/lower case word/filename can be a real pain in the butt to figure out.
I suggest picking one and sticking with it. I am lazy I use all lowercase.

Unix servers are case sensitive, so if you have a reference to an image in your html img src=Picture.jpg and the picture is actually named picture.jpg you will have a problem.

HTML comments or Include files I will use CAPS just to make the code stand out a little bit.

Jim S.
follow webwoman's advice.

HTML is going away, to be replaced with XHTML v1.0.  XHTML requires ALL tags be lowercase.  it also requires all tags be closed (even <br / > )

BRUNO
Whether HTML is going away, as brunobear thinks, should not be a matter of concern.  The current standard says all tags should be lowercase.  The older standards (and some books!) say upper or lower is OK.  Echoing others and adding my voice: You're better off using all lowercase tags for HTML.
ASKER CERTIFIED SOLUTION
Avatar of bruno
bruno
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
brunobear: Thank you very much for proving me wrong!  When I am wrong and someone provides a respected reference proving it then I appreciate the correction.  Thanks!
Ernest, no problem.

I knew you were wrong but wasn't sure I was going to be able to find the correct reference to prove it.  Thankfully I did.  :-)

now we just gotta get panrob back here to clean up this question....

BRUNO
Avatar of panrob

ASKER

sorry I was away on vacation and did not take my laptop