HTML and CSS Reference
Figure 2-2 shows all three parts of a tag.
Figure 2-2: The parts of a tag.
h e number of attributes is dif erent for dif erent elements.
Depending on the element, dif erent kinds of attributes will be available, and depending on
the attribute, dif erent types of values can be applied. As a general rule of thumb, use quota-
tion marks around values, including around numbers. Here are some dif erent examples:
<form action=”http://localhost/php/phpversion.php” method=”post”>
<input type=”text” width=”120” hidden=”false”>
<input type=”submit” value=”Sick 'em”>
You have to be careful about what you put in between the double quotes. For example,
value=”Sick 'em” is permissible because 'em has a single quote mark. However, the
value “”Sick 'em,” he said” would not work because two pairs of double quotes are
The language attribute
The language ( lang ) attribute in the HTML tag is not used unless you're creating a page for
something other than English. For example, the following are a list of other languages in which you
may develop Web pages and their corresponding language attribute values:
Chinese (Mandarin): “cmn“
German (Deutsch): “de“
Unlike some attributes, the lang attribute has a wide range of values. Go to www.iana.org/
assignments/language-subtag-registry for the full list.