Solved

Case Sensitivity

Posted on 2001-06-21
8
273 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
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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

920 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now