Wednesday, 31 August 2016

Hyper Text Markup Language (HTML) Introduction

HTML 5 Logo


HTML Introduction:

What is HTML?

HTML is a markup language for describing web documents (web pages).

  • HTML stands for Hyper Text Markup Language
  • A markup language is a set of markup tags
  • HTML documents are described by HTML tags
  • Each HTML tag describes different document content

Simple Example

<!DOCTYPE html>
<html>
<head>
<title>Title of Page</title>
</head>
<body>

<h1>Heading</h1>
<p>paragraph.</p>

</body>
</html>


Example Explained

The <!DOCTYPE html> declaration defines this document to be HTML5
The text between <html> and </html> describes an HTML document
The text between <head> and </head> provides information about the document
The text between <title> and </title> provides a title for the document
The text between <body> and </body> describes the visible page content
The text between <h1> and </h1> describes a heading
The text between <p> and </p> describes a paragraph


Using this description, a web browser will display a document with a heading and a paragraph.

Common <!DOCTYPE> Declarations

HTML 5:

<!DOCTYPE html>

HTML 4.0.1:

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

XHTML 1.0:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


HTML Versions:

Since the early days of the web, there have been many versions of HTML:

HTML           ----------------------------------      1991
HTML 2.0     ----------------------------------      1995
HTML 3.2     ----------------------------------      1997
HTML 4.0.1  ----------------------------------      1999
XHTML        ----------------------------------      2000
HTML 5        ----------------------------------      2014



No comments:

Post a Comment