01
What does HTML mean?
HTML stands for HyperText Markup Language.
It is the language we use to define the structure and content of a web page.
With HTML, we can tell the browser which element is a heading, which is a paragraph, where an image should appear and which text should become a link.
02
HTML uses tags.
Most HTML elements are written using an opening tag and a closing tag.
For example, a paragraph:
The first tag opens the element:
And the second closes it:
Between them, we write the content we want to display on the page.
03
Some basic tags.
You do not need to memorise hundreds of tags. We will start with a few that you will use regularly.
<h1>
Defines the main heading of a page.
<p>
Defines a paragraph of text.
<a>
Creates a link.
04
The basic structure of an HTML document.
An HTML page begins with a basic structure that we will use almost every time.
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My first website</title>
</head>
<body>
<h1>My first web page</h1>
<p>I am learning HTML.</p>
</body>
</html>
It may seem like a lot at first, but we will go through each part.
05
HTML, HEAD and BODY.
<html> contains the entire HTML document.
<head> contains information about the page that does not normally appear directly in its content.
<body> contains everything visitors see: headings, text, images, buttons and other content.
06
Headings have a hierarchy.
HTML has six heading levels:
<h2>Section heading</h2>
<h3>Subheading</h3>
<h4>Level 4</h4>
<h5>Level 5</h5>
<h6>Level 6</h6>
Do not choose headings simply because of their visual size. They represent the organisation and hierarchy of the content.
07
How to create a link.
Links connect pages to one another.
We use the tag:
For example:
The href attribute tells the browser which page the link should open.
08
Create your first HTML file.
Now let's create something real.
Create a folder on your computer called:
Inside it, create a file named:
The name index.html is important because it is commonly used for a website's homepage.
09
Write your first page.
Inside index.html, write:
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My first website</title>
</head>
<body>
<h1>Welcome to my website</h1>
<p>
This is my first page created with HTML.
</p>
</body>
</html>
Save the file and open it in your browser.
If everything is correct, you will see your heading and first paragraph.
SUMMARY
What you have learned.
- HTML defines the structure of a web page.
- HTML uses tags.
- Many tags have opening and closing forms.
- HEAD contains information about the page.
- BODY contains the visible content.
- Headings organise content.
- Links are created using the <a> tag.
- The homepage is usually named index.html.
PUT IT INTO PRACTICE
Build your first HTML page.
Use your index.html file and add:
- A main heading using h1.
- A subheading using h2.
- Two paragraphs.
- One link.
Then save the file and reopen it in your browser to check the changes.