Getting Started with HTML

To start coding HTML, you just need two components - A text editor and a web browser.

Creating an HTML document

.html
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>This is a Heading </h1>
<p>This is a paragraph.</p>

</body>

Open the text editor that you have on your computer. (Notepad, TextEdit, or gEdit) Click on File. Click on New.

Type the following code:

.html
<html>
<head>
<title > Learning HTML </title>
</head>
<body>
<p>I am making my first HTML program!</p>
</body>
</html>

Saving an HTML document

  1. Click on File> Save As. The Save As Dialog box appears.

  2. Specify the location and type the name of the file.

  3. Specify the extension .html or .htm. Click OK.

  4. The file will be saved.

Tip:

If you don’t specify the extension in the text editor, the file will be saved as .txt.

Opening an HTML document

Browse the location of the document. Double click. It will open the HTML document in the default web browser of your computer.

Tip:

The content that you enclose between the <title> and </title > tags are visible on the title bar of the web browser.