
WHAT IS HTML?
HTML stands for Hypertext Mark Up Language.
HOW TO SAVE A HTML DOCUMENT?
Step 1. After writing your HTML command in notepad click on File in Menu Bar.
Step 2. Then click on Save As option.
Step 3. Write the name of the HTML page and add .html to its end (without quotes) and the drop down list below saying Save as type select All Files and click on Save button.
HOW TO OPEN HTML DOCUMENT?
HTML Document cab be opened by double-clicking on it and the default browser windows will open and you will be able to see your HTML page.
HTML BASIC STRUCTURE:
MY HTML PAGE
THE BODY OF THE PAGE
tag attributes
- BGCOLOR
BGCOLOR is used to set the background colour of the HTML page.


- TEXT
TEXT attribute is used to specify the text colour of the HTML page.


- Attributes for setting the text links, visited links and active links colour in the html page.
- Link Attribute is used to set the colour of the link in the HTML page.
- ALink attribute is used to set the active links colour in the HTML page.
- VLink attribute is used to set visited links colour in the HTML page.
- Attributes for setting page margins
- Left margin attribute: This attribute is used to set the left margin of the HTML page. The value entered is in pixels.
- Right margin attribute: this attribute is used to set the right margin of the HTML page. The value entered is in pixels.
- Top margin attribute: This attribute is used to set the top margin of the page. The value entered is in pixels.
- Attribute for setting background image
Background attribute is used to set an image as the background for an HTML page.
Or
If the image is the same folder where the html page is located simply enter the following code:
See the following example:


Text formatting elements in HTML
TAG | TYPE | FUNCTION | ATTRIBUTES |
FONT | CONTAINER | Used to change size, colour and style of text | SIZE, FACE, COLOR |
BASEFONT | CONTAINER | Used to set a basic size for the font which the browser will use to display the HTML page. | SIZE |
BR | EMPTY | Used to insert a line breaks | NONE |
CENTER | CONTAINER | Center any text that is written within it | NONE |
H1 to H6 | CONTAINER | Used as heading element with various sizes 1-6 | ALIGN |
P | CONTAINER | Used to define a paragraph of text on the web page | ALIGN |
HR | EMPTY | Used segregate different parts of the text from one another with help of a horizontal line | SIZE, WIDTH, COLOR, ALIGN, NOSHADE |
COMMENT | CONTAINER | Comments are text that are written into the HTML page, but are ignored by the browser and hence not displayed. | NONE |
B | CONTAINER | Display text in bold face | NONE |
I | CONTAINER | Display text in italics | NONE |
U | CONTAINER | Underlines the enclosed text | NONE |
SUP | CONTAINER | Display text in superscript | NONE |
SUB | CONTAINER | Display text in subscript | NONE |
Using FONT Tag
Font tag is a very convenient tag used to change the size, colour and style of the text, especially when different segments of text require different looks.
This is font tag
Font tag attributes:
SIZE - THE TEXT SIZE IS NOW 20
COLOR - THE TEXT COLOR IS NWO GREEN
FACE - THE TEXTS FONT IS ARIAL
See the coding below:


Using BASEFONT Tag
tag is used to set the basic size for the font, the browser will use to display your HTML page.
- A single value ranging from 1 to 7
e.g.
- A relative value by placing a plus or minus sign before the value
The base font size will increase the existing size by 4 resulting in a total font size of 7.
The base font size will decrease the existing size by 2 resulting in a total font size of 5.
Using BR Tag
The
tag is used to give break between the lines or words in a HTML document. It gives page a neat and organised look and makes it visually appealing.
Try this code:

Using
tag
tag is used to set text or image in centre align. It is a container element so the text entered within this tag gets center aligned.


Using
to
tags
These tags are known as heading tags. HTML has six level of heading tags from
to
.
They are used to a text as heading in html document.
For e.g.
This is heading
Align attribute is used to set the alignment of the heading existing in heading tags.
For e.g.
The heading alignment is right
Using
tag
tag is used to specify the paragraph in the document and also to set the alignment of the different paragraphs.
Syntax:
THE PARAGRAPH HERE
Next page