A web page is the most fundamental component of a website. After all, a website is simply a collection of web pages which have been linked to each other. As such, whoever intends to build a website needs to begin by mastering how to create a web page.
Creating a web page actually isn’t that difficult. As soon as you know the basics, you can create one in less than 5 minutes. This guide is going to take you through the basic steps of creating a simple web page.
What You Need
In order to create a web page, there two basic things which you need to get started. First of all, you need a text editor like Notepad, Wordpad or TextEdit. You will use the text editor to type the code for the web page.
Secondly, you need a web browser like Chrome or Firefox (or the browser you are using to view this page). You will use the browser to preview your web page.
Once you have a text editor and a web browser, you are ready to create a web page. We can proceed to the language used to create web pages.
HTML is an acronym which stands for Hyper Text Markup Language. It is the language which is used for creating a web page. At a basic level, a web page is simply a document which is typed with HTML.
For instance, try typing the following in your text editor:
<h1> Hello, Welcome to my first web page! </h1>
If this looks like gibberish, don’t be afraid. You will understand what it means in a minute. For now, type the above text into your text editor (you can as well copy and paste it). Once you have it all typed, save it: give it a name (like “My-First-Webpage”) and give it an extension of “.html” or “.htm”. For instance, save it as “My-First-Webpage.html”.
Once you have saved it, go to the place where you saved it, and double click on it. If you have given it the right extension (.html or .htm), double clicking it will launch your default web browser, and display a blank page with the words:
Hello, welcome to my first web page!
Congratulations! You have just created a web page.
Now let’s explore what the gibberish we just typed means. As mentioned earlier, HTML is a language used to create web pages (it is not the only language, but that’s a story for another day).
Just like a human language, HTML has its own rules of syntax and semantics. The fundamental building block of HTML is something called a tag. A tag is something which looks like this “<head>” or “<html>” or “<h1>”.
A tag is used to describe an aspect of a web page. For instance, if you want to insert a paragraph on the web page, you use a <p> tag, to insert a table, you use a <table> tag, and so on. Basically, whatever you want on the web page, there is an associated tag which you can use to insert it.
The tags tend to come in pairs. There is an opening tag, and a closing tag. An opening tag looks like this <head>, while a closing tag has a forward slash sign after the first angled bracket (</head>).
An opening tag indicates the beginning of a certain part of a web page, while a closing tag indicates the end of the part. For instance, to insert a paragraph, you would write something like this:
<p> This is my paragraph </p>
<This is another paragraph </p>
There are three tags which every web page must have. These are: the HTML tag (<html>), the head tag (<head>) and the body tag <body>. The <html> tag indicates the beginning and the end of the web page. The <head> tag contains components which do not appear on the web page. For instance, you can include the <title> for inserting the text you want to appear on a tab.
The <body> tag contains the components which appear on the web page. Basically, whatever you want to appear on the web page, you place between the opening and closing <body> tags.
In summary, in order to create a web page, you need to observe the following steps.
1. Open up a text editor like Notepad
2. Type the following
3. Add the content which is relevant to your web page. For instance
<title> My first website </title>
<h1> Check out my website </h1>
<p> This is my simple paragraph </p>
<p> This is my paragraph with a little <b>glitz</b> and <em> glamour </em> </p>
4. Save the document with a .htm or .html extension. For instance, My-Webpage.html
5. Go to the location where you saved it, and double click on it.
6. The web page will open on your default browser. You can then begin adding whatever tweaks you want.