Hypertext Markup  «Prev  Next»

Lesson 4 Structuring HTML documents
Objective Describe the HTML page structure.

Structuring HTML Documents

HTML document structure

HTML documents are divided into two sections: the head and the body. The head contains information about the document. The body contains the content to be displayed in the browser. Tags embedded in the document provide instructions for structuring and displaying the header information and content.

Types of HTML tags

HTML tags direct the Web browser to display text in a certain way, for example, bold or centered. Angle brackets (< >) are used to delimit the tags and separate the tags from the content.
There are two types of HTML tags:
  1. container tags and
  2. empty tags.

Container tags are used to specify sections of text and to separate the heading from the body. Headings contain the title information. As shown below, an HTML document begins with a simple, but mandatory, framework made up of four sets of nested container tags.

The Emergence of Semantic HTML

Early versions of the HTML standard did not do much to separate the significance of content from the way it was presented. If you wanted to indicate that a span of text was important, you applied an HTML element that made the text bold. It was up to the user to make the association that bold content is important content. This is something that humans do very easily and that automated agents find very hard to do. The automated processing of content has become important in the years since HTML was first introduced, and there has been a gradual effort to separate the significance of HTML elements from the way that content is presented in the browser.

HTML Standard Lags Behind HTML Use

The process for creating a standard is always a long one, especially for something as widely used as HTML. Stakeholders want to influence new versions of the standard to their commercial benefit or particular point of view. Standards are not laws, and standards bodies fear fragmentation of a technology above all else. This leads to a lot of time-consuming reconciliation around how potential features and enhancements may work. The standards body for HTML is the World Wide Web Consortium (known as W3C). They have a difficult job, and it takes a long time for a proposal to become a standard. It takes a very long time for a revision to the core HTML specification to be approved. The consequence of the lengthy standards process is that the W3C has always been following the curve, trying to standardize what has already become accepted practice. The HTML specification has been a reflection of leading-edge thinking about web content from several years ago. This has reduced the importance of the HTML standard because the real innovation was happening away from the W3C, partly in the browsers and plugins.

HTML page framework

Container tags work in pairs. One container tag marks the beginning of an HTML statement; a matching container tag marks the end of that statement.
Empty tags do not refer to specific sections of text and do not require closing tags. Examples of empty tags include tags used to create line breaks and horizontal rules.
In the next lesson, you will learn about the most commonly used HTML tags.