HTML and CSS Reference
Markup Languages: More
Since markup is the essence of web documents, it provides the largest place for standardization efforts. The
popularity of HTML has not decreased since the birth of the Web. Becoming familiar with the versions and variants
of that language and understanding the differences between HTML and XHTML are crucial for understanding the
techniques for changing the document type. The general structure of all web documents follows the same logic.
The latest core version and by far the most popular markup language of the World Wide Web, HTML5, introduced
new structuring elements as well as multimedia element annotations that can be used to create rather sophisticated
document structures. By examining well-structured document examples, you will be able to build correct document
structures on your own. To achieve well-structuredness, the block-line and inline-level elements should be
differentiated, which is also important in understanding how to embed elements into each other (element nesting).
You should also know how to use Formal Public Identifiers and Document Type Definitions for creating standard-
compliant documents. The strict rules of XML declarations are vital for XHTML authoring. HTML5 can be used to
create HTML or XHTML documents (HTML5 or XHTML5, respectively), and documents that can be interpreted
either as HTML or XHTML (polyglot markup).
In this chapter, you will learn about the most important markup standards in web design, covering the most
advanced markup languages along with mixed-namespace document types. I provide sample HTML and XHTML
documents for the sake of easier understanding. You will understand how to distinguish deprecated elements and
attributes to avoid from the ones that can be used in almost all versions and variants of markup languages. Beyond
HTML, you will learn about the XML-powered mixed-namespace documents that display text-based vector graphics
and mathematical annotations. After reading the chapter, you will be able to apply semantically meaningful markup
elements and attributes, eliminate obsolete markup, and create web documents with correct element nesting and
■ The detailed description of markup basics is beyond the scope of this topic. Several resources are available
for both beginner and intermediate developers such as “Getting started with HTML,” a very short overview written by the
author/editor of HTML specifications, Dave Raggett , or “HTML: The Markup Language Reference” by Michael Smith .
There are also many topics on HTML5 [e.g., 3, 4, 5, 6] and XHTML 1 but the first HTML5 textbooks were published before
the standardization of HTML5, and often contain incorrect, obsolete, or incomplete descriptions. If you need a short
summary about a particular markup element, the W3C Cheatsheet can be very helpful too .
1 XHTML hand coders can write HTML markup with ease.