HTML and CSS Reference
In-Depth Information
According to the HTML standard, tag and attribute names are not case-
sensitive. There's no difference in effect between <head> , <Head> , <HEAD> ,
and even <HeaD> ; all of them are equivalent. With XHTML, case is im-
portant: all current standard tag and attribute names are in lowercase;
always <head> , never <HEAD> .
For both HTML and XHTML, the values that you assign to a particular
attribute may be case-sensitive, depending on your browser and server.
In particular, file location and name referencesor URLsare case-sensit-
ive. [ Referencing Documents: The URL, 6.2 ]
Tag attributes, if any, belong after the tag name, each separated by one
or more tab, space, or return characters. Their order of appearance is
not important.
A tag attribute's value, if any, follows an equals sign ( = ) after the at-
tribute name. You may include spaces around the equals sign so that
width=6 , width = 6 , width =6 , and width= 6 all mean the same. For read-
ability, however, we prefer not to include spaces. That way, it's easier to
pick out an attribute/value pair from a crowd of pairs in a lengthy tag.
With HTML, if an attribute's value is a single word or number (no
spaces), you may simply add it after the equals sign. You should enclose
all other values in single or double quotation marks, especially those
values that contain several words separated by spaces. With XHTML, all
attribute values must be enclosed in quotes. The length of the value is
limited to 1,024 characters.
Most browsers are tolerant of how tags are punctuated and broken
across lines. Nonetheless, avoid breaking tags across lines in your
source document whenever possible. This rule promotes readability and
reduces potential errors in your HTML documents.
3.3.2. Sample Tags
Here are some tags with attributes:
Search WWH ::

Custom Search