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
Solved

Case Sensitivity

Posted on 2001-06-21
8
275 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

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…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

840 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