How To Make A Webpage
How To Make A Webpage
In this tutorial we use a plain text editor (like Notepad) to edit HTML. I believe this is the best way to
learn HTML.
You save the document ALWAYS with whatever name you chooses ending with “.html”
</body>
</html>
The code <html> </html> tells us that you want to create a web page. Please note a webpage must
have an open and a close tag.
The code <body></body> defines what will be shown on the web page. Please note the body must have
an opening and a closed tag
HTML headings are defined with the <h1> to </h1> code. Heading is what we call the title. You can
change the number to different sizes. <h1> is the largest while <h6> is the smallest. All header tags
should have an opening and a closed tag.
This is called text aligning where you can choose for the words to be left, right or centre. We can do this
from within the “h” tags. For instance if I wanted to centre the title I would use the following codes.
<h1 style="text-align:center">
Similarly if I wanted to centre the paragraph I would use the following codes.
<p1 style="text-align:center">
We use the following codes when we want to give the web page some life.
<body style="background-color:yellow">
We write the code within the body tag. Also noticed that the word colour is spelt the American way
color as that is the way the computer understands it.
We use the following codes to change the style of the writing. We do this in the <body> tag, the <p> tag
or the <h> wherever you would like to change the style of the writing.
<body style=”font-family:arial”>
Note that you must type the code “font-famly:” before the name of the font you would like to use.
We use the following codes to change the colour of the writing. We do this in the <body> tag, the <p>
tag or the <h> wherever you would like to change the colour of the writing.
<p style="color:red”>
<body style=”color:blue”>
Note that you must type the code “color:” before the name of the colour you would like to use. If you
want a particular paragraph to have a different colour you use the <p> tag or if you want the whole
page to have a particular colour you use the <body> tag and similarly if you want your title to have a
different colour you use the <h> tag.
<p style="font-size:10px”>
<body style=”font-size:15px”>
Note that you must type the code “font-size:” before how big you would like your words to look. If you
want a particular paragraph to have a different size you use the <p> tag or if you want the whole page to
have a particular font size you use the <body> tag.
Tables are defined with the <table> tag. A table is divided into rows (with the <tr> tag), and each row is
divided into data cells (with the <td> tag). The letters td stands for "table data," which is the content of a
cell. A data cell can contain text, images, lists, paragraphs, forms, horizontal rules, tables, etc.
<table>
<tr>
<th>Day</th>
<th>Subject</th>
</tr>
<tr>
<td>Monday</td>
<td>Information Technology</td>
</tr>
</table>
The table has an opening and a closed tag. The rows and columns are defined within these tags <table>
</table>
If you would like to make more rows and column simply copy the <tr> to </tr> code.
Notice in the code above there are some codes called <th></th>. Within this code is the table header or
what gives the title for each of the column.
<img src="mypicture.jpg"/>
You can place the image anywhere you prefer on your web page. However you must ensure that the
picture and the web page are in the same folder for the picture to show on the page.
The name of the image must be the same as that in the code.