HTML Tutorial #2: Create Your First Webpage


In previous tutorial we have learned about Element, Tags and attributes. Now we learn how to create the first web page. HTML can be coded in any text editor like Notepad, Notepad++ or in Adobe Dreamweaver. Important: Always save the main file as “index.html” of your website. It will help you when you are uploading your website to server and server will recognize it as the home page of website.

How to Save HTML File

First of all you open any text editor or software for coding html. Here I will use Notepad++, now create a new file savefile and save index.html. Remember every HTML document is saved with the extension of .html or .htm. Whenever you save a html document, remember to use .html or .htm at the end of file. It tells computer that it is web page.

htmlNow come towards coding the page. First we have to tell the browser that it is a HTML document. So every HTML webpage starts with <html> and ends up at </html>. The whole page coded between <html> </html>. First one is opening tag and the second is closing tag. It tells browser that pages ends here.

Head and Body

There are two major sections of a web page. One is Head and the other is Body. headnbodyIn head we define the title, keywords and description of webpage. Head doesn’t appear on the webpage. The body is used for text and tags that are shown directly on the page. Everything that we want to show on the webpage should be in body.

Now we are going to set a title for our HTML document. For defining the title of the webpage, we use this code.

<title> your title here </title>title

We have to use this tag in head. Here is an example how to use it.

How to add Content to Webpage?

I already mentioned that, webpage whatever we want to show on the webpage should in body area. Let’s suppose, we want to show paragraph on the website, we use <p> tag to show a paragraph. Now type,

<p> My first Website </p>

In body and save file.

Now open the folder where you saved your file and open it with any browser. You will see the first webpage you have created.


Journalist, Android Application Developer and Web Designer. Writes article about IT in Roznama Dunya. I Interview Prominent Personalities & Icons around the globe.

Leave a Reply