Solved

Case Sensitivity

Posted on 2001-06-21
8
276 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 50 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

Suggested Solutions

Title # Comments Views Activity
really easy css change help please 4 33
I need help changing the colour of this image rollover please? 3 23
email validation 9 49
CSS - Centering an image 2 26
When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

733 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