How to create a web page using HTML


You can start creating HTML web pages right away by following these five steps:

Step 1: Choose a text editor like Notepad

A text editor is simply a type of software which allows you to create or edit plain text files. We need a text editor because the HTML code is written as plain text. There are a lot of free and paid text editors available like "Notepad", "Notepad++", "TextEdit", "Sublime Text" etc. but for the purpose of this tutorial we will use "Notepad" which is the default text editor for Windows Operating System. You can use any other text editor if you like because the basics will remain the same.

Advanced users may use an IDE like "Adobe Dreamweaver" which has much more features than a simple text editor


Step 2: Open the text editor

To create a web page using html you first need to locate and open the text editor program. You may need to download and install the software if you don't have it yet. If you already have a text editor program installed on your computer then you may first check it on your desktop but if you can't found it there then you can always search it in the installed programs on your computer. When you found the editor you can open it by double clicking on its icon.


Step 3: Write HTML code

After opening the text editor you can write your own HTML code or even copy it from the example given below.

Example

<!DOCTYPE html>
<html>
<head>
<title>Document Title</title>
</head>
<body>

<h1>My first heading</h1>
<p>This is my first paragraph.</p>

</body>
</html>

Try it yourself


Step 4: Save the HTML file

To save the HTML file on your computer go to "File" > "Save as" from the menu bar of "Notepad". Now a popup will appear which allows you to write the file name and change some other options. Name the file as "index.html" and change the encoding to "UTF-8" (which is the recommended encoding type for HTML files).

Tip: You can either use ".html" or ".htm" as file extension. It's just a matter of personal preference.


Step 5: Open the HTML file using web browser

 As you have saved the HTML code, now it's time to view it using your favorite web browser (like: Google Chrome, Firefox, Safari, UC Browser, Internet Explorer, Opera etc.). To open the HTML file you can double click on its icon or even right click on the icon and then choose "Open with", after that you can select your favorite web browser from the list.

The result you see in the browser will be much similar to the screenshot below.

Browser Screenshot


Previous Next