HTML Introduction

What is HTML?

HTML stands for Hyper Text Markup Language. It is the language used for displaying web pages in a browser. HTML is the basic building block and skeleton for all websites. It builds the structure of a web page.
HTML is not a programming language. Unlike other programming languages like C/C++ it doesnot show any syntax errors or warnings in the browser if the markup (or syntax) is incorrect. Also, the browser doesnot stop displaying the web page if the HTML markup is incorrect. But we may observe some unexpected results in the browser's display if the markup is not correct.

Is HTML easy to learn?

Yes, HTML is one of the easiest languages with a simple and easily understandable syntax. You can create a very simple and basic web page within 5 minutes after reading this page!

What are the requirements to create a web page?

To build your first web page you need only two things!
  1. A text editor. For example Notepad, Notepad++, gedit.
  2. A browser to test your code. For example Chrome, Firefox, Internet Explorer, Opera, Safari or the one you are already using to view this page.


A typical HTML document looks as shown below.
<title>Your page title</title>
<!-- An HTML comment which is not displayed on the web page -->
<h1>Your page heading</h1>
<p>Your page content in a paragraph.</p>
In the above example, the words <html>, <head>, <title>, <body>, <h1>, <p> etc., are called tags. More details about them will be discussed in the tags page.

How to display above example in a browser?

Its very simple.
  1. Open your text editor, for example Notepad, and copy-paste the above example code in the editor.
  2. Save the file as example.html or somename.html. While saving the file (for example in Notepad), you will also be given an option Save as type. The text editor by default saves it as a Text Document (.txt file). But we should save it as type All Files as the file name should have a .html extension but not .txt extension. A browser cannot interpret the HTML code in a text file.
  3. Now double click on the .html file you just created to open it in your web browser.
Congratulations! You have made your first basic web page. Now try changing the words (not tags) in the example code and observe the changes in the browser's display.