HTML stands for HyperText Markup Language, and it is the language used to create web pages. A web page is a document that is viewed in a browser, and every web page you have ever opened is written in HTML. The word "HyperText" means text that can contain links to other pages, and "Markup" means marking the text with tags so that the browser knows how to display it. HTML is not a programming language because it does not perform calculations; it is a markup language that describes the structure and look of a page. HTML pages are stored as text files with the extension .html or .htm.
2. Tags and Elements
The basic building blocks of HTML are tags. A tag is a code word written between angle brackets, such as or . Most tags come in pairs: an opening tag like and a closing tag like , where the closing tag has a forward slash. The opening tag, the content and the closing tag together form an element. For example, Hello is a bold element. Some tags, like the line break , do not have a closing tag and are called empty tags. Tags can also have attributes, which are extra instructions written inside the opening tag, such as the src attribute of an image.
3. The Basic Structure of an HTML Page
Every HTML document follows the same skeleton. The document begins with <!DOCTYPE html>, which tells the browser that it is an HTML page. The whole document is enclosed in the tag. Inside it, the section contains information about the page that is not shown on the screen, such as the , which appears in the browser tab. The section contains everything that is visible on the page, such as headings, paragraphs and pictures. This fixed structure of html, head and body is the skeleton on which every web page is built.
4. Headings, Paragraphs and Text Formatting
HTML provides six levels of headings, from
, the largest, to
, the smallest. A paragraph is written with the
tag, and the browser adds space before and after each paragraph. Text can be formatted with simple tags: makes text bold, makes it italic, and underlines it. The
tag places content in the middle, and breaks a line, while draws a horizontal line across the page. The tag can change the colour, size and face of the text, for example .
5. Lists in HTML
Lists organise information into easy-to-read points. An ordered list is created with the
tag, and its items, written inside
tags, are numbered automatically as 1, 2, 3. An unordered list is created with the
tag, and its items are shown with bullets such as dots or squares. Each item of both lists is written as
item
. The type attribute can change the numbering style: type="1" gives numbers, type="A" gives capital letters, and type="I" gives Roman numerals for ordered lists.
6. Images and Links
Pictures make a web page attractive, and an image is inserted with the tag, which is an empty tag. The src attribute gives the name or address of the picture file, and the alt attribute shows a text message if the picture cannot load, for example . Links connect one page to another and are created with the anchor tag. The href attribute holds the destination address, and the link text is written between the opening and closing tags, for example My School. Clicking the link text opens the destination page.
7. Tables in HTML
A table in HTML is used to show data in rows and columns. The
tag creates the table, the
tag creates a table row, the
tag creates a table heading cell, and the
tag creates a data cell. The border attribute sets the thickness of the table border, and the align attribute places the table on the left, right or centre of the page. A table can also be coloured by setting the bgcolor attribute. For example, a table with two rows and two columns is made of two
tags, each containing two
tags.
8. Saving and Viewing an HTML File
An HTML file is created in any simple text editor such as Notepad, saved with the .html extension, and then opened in a browser. The steps are simple: type the code, choose Save As from the File menu, type a file name such as mypage.html, choose "All Files" as the file type so that the .html extension is kept, and then double-click the file, which opens automatically in the default browser. Any mistake in the code is not shown as an error message; instead, the browser simply shows the page incorrectly, so the code must be checked carefully.
Quick Revision Tables
Table 1: Basic HTML Tags
Tag
Use
Contains the whole web page
Holds information not shown on the page
Name shown in the browser tab
Holds all visible content
to
Headings from largest to smallest
Paragraph
, ,
Bold, italic, underline
Line break
Table 2: HTML Elements for Special Features
Tag or Attribute
Use
/
Ordered and unordered lists
List item
Insert a picture
Create a link
/
/
Table, table row, data cell
Table heading cell
bgcolor
Set the background colour
align
Place content left, right or centre
Mind Map
graph TD
A["HTML"] --> B["Structure"]
A --> C["Text Formatting"]
A --> D["Lists"]
A --> E["Images and Links"]
A --> F["Tables"]
B --> B1["html, head, body"]
B --> B2["title"]
C --> C1["h1 to h6"]
C --> C2["p, b, i, u, center"]
D --> D1["ol and ul"]
D --> D2["li"]
E --> E1["img with src and alt"]
E --> E2["a with href"]
F --> F1["table, tr, th, td"]
F --> F2["border and align"]
Important Diagrams (SVG)
Diagram 1: Structure of an HTML Page
Diagram 2: Tags, Attributes and Elements
Common Mistakes
Forgetting the closing tag. Most tags come in pairs, and needs the forward slash.
Writing tags in capital letters like . Tags can be written either way, but small letters are the standard.
Saving an HTML file without the .html extension, so the browser cannot open it as a web page.
Confusing the head and the body. The head holds the title; the body holds the visible content.
Writing without the alt attribute, which is good practice for accessibility.
Forgetting the slash in or , which breaks the element.
Believing HTML can do calculations. HTML is a markup language; it cannot perform arithmetic.
Using
for a small sub-heading.
is the largest heading; smaller headings are
to
.
Exam Tips
Write the full form first: HTML stands for HyperText Markup Language.
Draw the html, head and body structure diagram and label each section.
Give one complete example for a tag, such as Hello is a bold element.
Memorise the attribute pairs: img uses src and alt, a uses href.
Learn which tags are empty: and have no closing tag.
Explain the difference between ordered () and unordered (
) lists with one example each.
Mention that an HTML file is created in a text editor, saved as .html, and opened in a browser.
Conclusion
HTML is the markup language that creates every web page, using tags enclosed in angle brackets. The head and body structure gives every page its skeleton, headings and paragraphs organise the text, lists and tables arrange information, and images and links make pages lively and connected. An HTML file is written in a text editor, saved with the .html extension, and viewed in a browser. Now that we can describe and build pages, we take one more step in the final chapter and learn how to give a computer real instructions through programming fundamentals.