HTML and CSS Reference
not all browsers support the latest selector syntax provided by CSS3. Appendix A at the back
of this topic and available online provides a list of HTML tags and corresponding attributes
that will allow you to alter the Web page elements as needed, and Appendix D has complete
information on the properties and values associated with different CSS elements.
Document Object Model (DOM)
HTML can be used with other Web technologies to provide additional Web page
functionality. For example, the term Document Object Model ( DOM ) describes a
document to create interactive, animated Web pages. This is a model in which the Web
page (or document) contains objects (elements, links, etc.) that can be manipulated. DOM
allows a Web developer to add, delete, or change an element or attribute. Web pages
enhanced with DOM can be more responsive to visitor interaction than basic HTML
Web pages. Not all interactive Web pages require DOM, but if you have a need for
are covered in later chapters in the Comprehensive (12-chapter) version of this topic.
Extensible Hypertext Markup Language (XHTML)
As you have learned, HTML uses tags to describe how a document should appear
in a Web browser, or the Web page format. HTML is used to display data, whereas
Extensible Markup Language ( XML ) is designed to transport and store data. XML
provides a set of rules that are used to encode documents in machine-readable form. XML
is not a replacement for HTML, but it is a software- and hardware-independent tool that
is used to carry information. Chapter 12 discusses XML in depth and is used to teach
XML specifics to students. Extensible Hypertext Markup Language ( XHTML ) is a
reformulation of HTML formatting so it conforms to XML structure and content rules.
By combining HTML and XML, XHTML combines the display features of HTML and
the stricter coding standards required by XML.
As mentioned previously, the projects in this topic utilize some of the new tags and
attributes introduced with HTML5. The XHTML standards do not apply to HTML5,
but we will adhere to the XHTML coding practices as per Table 1-3 because these
practices create a uniformity of coding styles. Applying the XHTML coding practices
together with any new HTML5 tags or attributes will not cause a problem when you
validate your code as long as you use the HTML5 <!DOCTYPE> statement:
at the start of your Web page.
An important step in Web development is to check that your Web pages are
compliant with HTML5 standards as defined by W3C. You will validate your Web pages
starting in Chapter 2, using the new HTML5 <!DOCTYPE> statement noted above,
and continue that process throughout the topic. Most Web pages already developed do
not validate. However, it is best that you begin your Web development training using the
standards recommended by W3C.
Table 1-3 lists some of the coding rules that Web developers should follow to
ensure that their HTML code conforms to XHTML standards when using a combination
of HTML 4.01 and HTML5 tags and attributes. All of the projects in this topic follow
XHTML standards (except for the <!DOCTYPE>) and adhere to the rules outlined in
Table 1-3. The specifics of each rule are explained in detail when used in a project.