16 Lesson 2
You might have noticed one more change from the HTML required ele-
<html> tag has some new attributes: xmlns, xml:lang, and
lang. In HTML, you only have to include the <html> tag to identify the
document as an HTML file, but XHTML requires that you use the xmlns
attribute to link your document to the W3C’s definition of XHTML,
which continues to evolve. You will learn more about this evolution and
how to prepare for it in Lesson 17, “Planning for the Future.” For now,
just remember to include the
<!DOCTYPE> tag and the full <html> tag
(shown in the following sample) in all your Web pages. Figure 2.3
demonstrates how the XHTML page, created previously, would appear in
PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
Caution This book uses the Transitional variation of
<!DOCTYPE> tag throughout. It’s a good habit to
get into, allowing you to conform to W3C rules, but
offering more flexibility that the Strict variation.
FIGURE 2.3 Notice that adding the XHTML declaration does not
affect your page’s appearance.
Caution The <!DOCTYPE> tag is the only tag that
appears in uppercase. All other HTML tags should be
lowercase as explained in the next section.