Lesson 1

Introduction to HTML5

This lesson is an introduction to the HTML5 markup language. The HTML5 markup ­language is a language for structuring and expressing the content of a web page in a manner that can be consistently interpreted by a web browser.

If you are already familiar with HTML, much of this chapter will look very familiar. It is still important that you read through this lesson, however, because there are a number of ­important changes in HTML5, and many of these are very subtle.

If you are not familiar with HTML, or have only a passing familiarity, this lesson will ­provide you with the background you need to understand the basics of an HTML web page. This lesson is only an introduction, however; the material in this lesson will be enhanced in the remainder of this section.

What Is a Markup Language?

A markup language is a language for annotating a document with a set of tags. These tags are used to provide additional meaning and structure to the text of the document, or provide instructions on the manner in which it should be displayed to the reader.

For instance, a tag may state that one portion of the text is a header, while another portion is a paragraph of text. Consider the following document fragment:

<h1>This is a heading</h1>
<p>This is a paragraph of text</p>

In this example, the tags can be clearly differentiated from the content of the document by the angle brackets. The following represents the start of a heading:

<h1>

while this represents ...

Get HTML5, JavaScript, and jQuery 24-Hour Trainer now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.