HTML Tutorial HTML References

HTML - Introduction



HTML stands for HyperText Markup Language. It is a language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScript. HTML was created by Berners-Lee in late 1990 but "HTML 2.0" was the first standard HTML specification which was published in 1995. HTML 4.01 was a major version of HTML and it was published in late 1999. In 2004, development began on HTML5 and completed and standardized on 28 October 2014.

Language Features:

  • HTML is used to create web pages and web applications.
  • A static website can be created using HTML only.
  • HTML describes the structure of a Web page.
  • HTML is widely used language on the web.
  • HTML consists of a series of elements and tells the browser how to display the content.

Basics of a HTML Document

The following is an example of a simple HTML document.

<!DOCTYPE html>
<html>

  <head>
    <title>This is document title</title>
  </head>	

  <body>
    <h1>This is a heading</h1>
    <p>Hello World!</p>
  </body>
  	
</html>

The output of the above script will be:



Lets break down this example to learn basic concepts of HTML:

  • <!DOCTYPE html> declaration tag: Defines that this document is an HTML5 document.
  • <html> element: This element contains the complete HTML document and mainly comprises of document header and document body tags.
  • <head> element: This element represents the document's header and contains meta information about the HTML page.
  • <title> element: This element is used inside the <head>...</head> element and specifies title of the HTML page (which is shown in the browser's title bar or in the page's tab).
  • <body> element: This element represents the document's body and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.
  • <h1> element: This element represents the large heading.
  • <p> element: This element represents a paragraph.

HTML Element

HTML uses tags to format the content. These tags are enclosed within angle braces <Tag Name>. Apart from few exceptions, most of the tags have their corresponding closing tags, for example, <html> has its closing tag </html> and <head> tag has its closing tag </head> tag etc.

An HTML element is everything from the start tag to the end tag:

Start tagElement contentEnd tag
<title>This is document title</title>
<h1>This is a heading</h1>
<p>Hello World!</p>

HTML Page Structure

A typical HTML document can be visualized with the following page structure:

HTML visual representation