Capital or small caps

S

Samuel van Laere

Hello,

usually I write all my tags and attributes in small caps
with the only exeption being the doctype.
Now someone is asking me if HTML allows tags and attributes to be written in
capital letters.
I do not know the answer to that.

Does anyone knows?

cheers,
Samuel
 
A

Adrienne

Gazing into my crystal ball I observed Samuel van Laere writing in
Hello,

usually I write all my tags and attributes in small caps
with the only exeption being the doctype.
Now someone is asking me if HTML allows tags and attributes to be written in
capital letters.
I do not know the answer to that.

Does anyone knows?

cheers,
Samuel

HTML is not case sensitive. XHTML is.

It's a matter of preference. When I write HTML I quote all attributes,
and I use lower case. I also always name images, etc. in lower case. I
know that some people prefer CaMeL case, but that's a PITA for me.
 
J

John Hosking

Samuel said:
usually I write all my tags and attributes in small caps

I think (i.e., I'm guessing) that by "small caps" you mean lowercase.
This sentence uses all lowercase letters except for the first letter.
with the only exeption being the doctype.
Now someone is asking me if HTML allows tags and attributes to be written in
capital letters.

Parallel to "uppercase", the capital letters you're talking about are
also known as lowercase letters.

HTML mostly allows upper- or lowercase elemants and attributes, but see
<http://www.w3.org/TR/html401/types.html#h-6.1>.

XHTML requires lowercase. See <http://www.w3.org/TR/xhtml1/#h-4.2>,
which I can quote here in its entirety:

4.2. Element and attribute names must be in lower case

XHTML documents must use lower case for all HTML element and attribute
names. This difference is necessary because XML is case-sensitive e.g.
<li> and <LI> are different tags.



One tool (in addition to the W3C's specs and your favorite search
engine) to find the answer to such questions is the W3C's validator,
which is at <http://validator.w3.org/>.
 
L

Lars Eighner

the lovely and said:
usually I write all my tags and attributes in small caps

This does not make sense. HTML is text. Text only comes in
lowercase and uppercase.
with the only exeption being the doctype.
Now someone is asking me if HTML allows tags and attributes to be written in
capital letters.

HTML tags and attributes are not case sensitive. XHTML requires lowercase.
So lowercase is good for HTML if there is any chance the documents will be
converted.
I do not know the answer to that.
 
H

Harlan Messinger

Samuel said:
Hello,

usually I write all my tags and attributes in small caps
with the only exeption being the doctype.

How in the world do you write tags and attributes in small caps?
Now someone is asking me if HTML allows tags and attributes to be written in
capital letters.
I do not know the answer to that.

Tag and attribute names are case-insensitive in HTML, except in the case
of XHTML, which follows the rules of XML, which means they are
case-sensitive--and in HTML, the standard tag and attribute names are
defined as lower-case.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top