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:
|
|
|
|
|
|
|
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 tag | Element content | End 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: