Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

Case Sensitivity

Posted on 2001-06-21
8
Medium Priority
?
282 Views
Last Modified: 2010-04-09
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?
0
Comment
Question by:panrob
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 19

Expert Comment

by:webwoman
ID: 6215006
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.
0
 
LVL 2

Expert Comment

by:TenTonJim
ID: 6215670
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.
0
 
LVL 18

Expert Comment

by:bruno
ID: 6216352
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
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 1

Expert Comment

by:Ernest022699
ID: 6216816
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.
0
 
LVL 18

Accepted Solution

by:
bruno earned 200 total points
ID: 6218827
Ernest I hate to prove you wrong but...

In CURRENT HTML 4.01 standards it states
"Element names are written in uppercase letters (e.g., BODY). Attribute names are written in lowercase letters (e.g., lang, onsubmit). Recall that in HTML, element and attribute names are case-insensitive; the convention is meant to encourage readability."

accessible at :  http://www.w3.org/TR/html401/about.html#h-1.2.1


If you would like more info on the conversion of HTML to XHTML please check:

http://www.w3.org/MarkUp/


The reason to use lowercase is because of HTML's conversion to XHTML, which is XML based and has VERY strict standards.


PANROB,

How about closing off this question?  I think you should be able to accept webwoman's answer and PAQ this.  Webwoman if panrob does not return, I suggest proposing an answer as you were correct.

BRUNO
0
 
LVL 1

Expert Comment

by:Ernest022699
ID: 6218999
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!
0
 
LVL 18

Expert Comment

by:bruno
ID: 6219148
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
0
 

Author Comment

by:panrob
ID: 6224674
sorry I was away on vacation and did not take my laptop
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

647 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question