HTML is a language you use to create web pages. Today, we'll create a web page that says "Hello world" in big letters.
#0 Elements & tags
When you write HTML code, you write one or more
<body>). These are also called
tags, although the
also a tag so it can get confusing. In this course we'll thus use
element to mean
tag to mean
There are two kinds of elements: block level elements that can contain
other elements (e.g.
<html>) and inline elements that only can
contain text (
#1 Create a file called hello.html
In your editor, create a new file and call it
#2 Add the html element
#3 Add the body element
<html> <body> </body> </html>
#4 Finally, add the h1 element.
The h stands for headline and
1 means it's the biggest
headline. There are also
smaller headlines, just like you have in your document processor:
<html> <body> <h1>Hello world</h1> </body> </html>
That's it. You can now open your browser, e.g. Firefox, and open the
hello.html file to view the result. Congratulations, you've now
made your first web page!
Counting from zero 🎭
Did you notice above that the first item was numbered 0 rather than 1? This is common coding humour. In computer science, many thing start with 0 instead of 1 and coders like to use 0 as the first item when writing emails, chats or posters too.
In depth: HTML is a standard maintained by a group called W3C, read the full details of the HTML language on their website: HTML 5.2 at W3C.