Form 1 · Chapter 4

HTML Coding

HTML is the language of web pages. Learn about tags, elements and attributes, and build a simple page a browser can show.

The language of web pages

HTML stands for HyperText Markup Language. It is the language used to build every web page you see. HTML does not do calculations; instead it describes the parts of a page — headings, paragraphs, images and links — so that a browser such as Chrome knows how to show them.

Tags, elements and attributes

HTML uses tags written inside angle brackets. Most tags come in a pair: an opening tag and a closing tag with a slash. The opening tag, content and closing tag together form an element. For example, <p>Hello</p> is a paragraph element. A tag can also carry an attribute that gives extra information, like <a href="page.html">.

Key idea

A tag is written as <name>. A closing tag adds a slash: </name>. Opening tag + content + closing tag = one element.

Building a simple page

A basic page has a <html> element containing a <head> (with the <title>) and a <body> (the visible content). Common tags include <h1> for a big heading and <p> for a paragraph.

Example

<body>
<h1>My Page</h1>
<p>Welcome!</p>
</body>
The browser shows a big heading and a paragraph below it.

Stuck on this topic? A verified JomKelas tutor can walk you through it.

Find a verified tutor