Your Ad Here

HTML is Root


Now that you have an idea of what DOCTYPEs and DTDs are, you can begin authoring
your documents. Oddly enough, in early versions of HTML the <html>
tags were not required. In fact, if you create a document and leave the <html> tags
out of it, it will surely display, even though it won’t be a conforming document.
However, the <html> tagset does form an important piece of the structure of a
document—one that you will later want to have available for use with style and
scripting, and for global application of the lang attribute, discussed later this
chapter. It’salso important to move forward withXHTML,as you’llsee in Chapter 7.
The html element is what’sreferred to as the “root” of the document. It is from this
root that the document tree grows. Document trees are a means of showing the
schematic relationships of elements within the document. Being able to identify
trees within documents will help you immeasurably as you work with style and
scripts.
Check out Listing 6-1. In it, I’ve begun to build a document using HTML 4.01
Transitional. While incomplete, it includes the proper DOCTYPE declaration and
the root element with its opening and closing tags.

0 comments:

Post a Comment

Popular Posts

Recent posts