HTML Introduction

What is HTML?

HTML is a language used to describe web pages.

  • HTML refers to Hypertext Markup Language: H yper T ext M arkup L anguage li>
  • HTML is not a programming language, but a tag language
  • The markup language is a set of markup tags (markup tag)
  • HTML uses tag tags to describe a web page
  • HTML documents contain HTML tags and text content
  • HTML documents are also called web pages

HTML Example

A little HTML document:

<!DOCTYPE html>
<title>Page Title</title>

<h1>My First Heading</h1>
<p>My first paragraph.</p>

Try it yourself »

Example Explained

  • The DOCTYPE announcement characterizes the record type to be HTML
  • The tags between <html> and </html> depicts a HTML document
  • The tags between <head> and </head> gives data about the document
  • The tags between <title> and </title> gives a title to the document
  • The tags between <body> and </body> portrays the noticeable page content
  • The tags between <h1> and </h1> portrays a heading
  • The tags between <p> and </p> portrays a paragraph


"HTML tag" and "HTML element" usually describe the same thing.

But strictly speaking, an HTML element contains a start tag and an end tag, as in the following example:

HTML element:

  • HTML labels ordinarily come in pairs like <p> and </p>
  • The first tag in a couple is the begin tag, the second tag is the end tag
  • The end tag is composed like the begin tag, however with a slash before the label name

Web Browsers

Web browsers (such as Google Chrome, Internet Explorer, Firefox, Safari) are used to read HTML files and display them as web pages. Browsers do not display HTML tags directly, but you can use tags to decide how to present the contents of an HTML page to the user:

View in Browser

HTML Page Structure

The following is a visual HTML page structure:

<title>Page title</title>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>

The <!DOCTYPE> Declaration

The <!DOCTYPE> statement helps the web page display properly in the browser.

There are many different files on the web. If you can declare the HTML version correctly, the browser can display the content of the webpage correctly.

doctype declarations are not case sensitive and can be used in the following ways:

<!DOCTYPE html>


<!doctype html>

<!Doctype Html>

Common Declarations


<!DOCTYPE html>

HTML 4.01

<!DOCTYPE HTML PUBLIC "-/W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

HTML Versions

various adaptations of HTML:

Version Year
HTML Initial release date 1991
HTML 2.0 Initial release date 1995
HTML 3.2 Initial release date 1997
HTML 4.01 Initial release date 1999
XHTML Initial release date 2000
HTML5 Initial release date 2014