Adding Content to the TemplateExample 2-18 takes the template created in tutorial 1, "Building an HTML Page," and has added some of the features introduced in this tutorial so you can get context for them in a working document. Example 2-18. Adding content to the template<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR Load this on up in your web browser and take a look! QUANTUM JUMP: THE IMPORTANCE OF STRUCTURE In this tutorial, you've gotten a great start learning about two of the most important aspects of a web page: text and links. But along the way, you also learned a bit about the importance of semantics, or meaning, of elements and their tags. This understanding is so important because when you misuse elements to achieve visual results rather than to convey meaning, you limit the document a great deal. The meaning of these elements is a part of logical document structure, and a logical document structure, in turn, generates what's known as a document tree. A document tree is simply the hierarchical logic of your document's structure, based on the semantics of the tags you're using to mark up your content. This tree isn't particularly relevant on its own, but the moment you begin applying CSS, JavaScript, or server-side scripts for dynamic content generation, the document tree becomes incredibly important. A clean document generates a logical document tree, making the CSS and scripting all the more easy because you can rely on advanced concepts in both that rely on such issues as inheritance. Without a clear document tree, you will be at a disadvantage when trying to debug documents. |