Web Developer Path ยท lesson 1 of 18
How the web works and your first HTML page
Understand what happens when you open a web page, then build one yourself: the page skeleton, a title, a heading, a line break and a comment.
What you will learn
- the difference between the internet and the web, and what HTTP and HTTPS do
- what HTML is and what a tag is
- the five parts every page needs:
<!DOCTYPE html>,<html>,<head>,<title>and<body> - line breaks with
<br>and comments with<!-- -->
Understand the idea
The internet is the worldwide network of connected computers. The web is one of the things that runs on it: pages that you ask for with an address or a link. When you type an address, your browser sends a request to a server using HTTP, or HTTPS, the secure version that shows a padlock. The server answers by sending back a file, and for a web page that file is written in HTML.
HTML stands for HyperText Markup Language. It does not make decisions like a program does. Instead it labels content: this part is a heading, this part is a paragraph, this part is a list. The labels are called tags and are written in angle brackets. Most tags come in pairs, an opening tag such as <h1> and a closing tag with a slash such as </h1>, and whatever sits between them is the content.
Every page has the same skeleton. <!DOCTYPE html> tells the browser that this is modern HTML. <html> wraps the whole page. Inside it, <head> holds information about the page, for example its <title>, which is the name shown on the browser tab. <body> holds everything people actually see. Two small extras are worth knowing now: <br> ends a line and has no closing tag, and <!-- text --> is a comment that the browser ignores, useful for notes to yourself.
You can write HTML in any plain text editor and open the saved file in a browser. Many developers use a free editor such as Visual Studio Code and keep every version of their work safe with Git. In this course the editor is built into the page, so you can start straight away.
Example
<html>
<head>
<title>My first page</title>
</head>
<body>
<!-- This is a comment: the browser skips it -->
<h1>Hello, web!</h1>
Line one<br>
Line two
</body>
</html>The title appears on the browser tab, the heading is shown on the page, and <br> starts a new line.
Your turn: code to type and practise
Complete the page: give it the title My page, put an h1 heading inside the body, add two lines of text separated by <br>, and add an HTML comment.
Stretch challenge
Change the title and heading to your own name, then add a second line break.
More in this module
Keep going in Web Developer Path
Elements, attributes and text formatting
Write a paragraph with the id `notes` that contains important text (`strong`), emphasised text (`em`), highlighted text (`mark`) and a subscript (`sub`).
Start โ3Links, lists and tables
Build a timetable table with a heading row of three `th` cells (Day, Subject, Time) and at least two rows of three `td` cells. Then add an ordered list of three steps and a link to `#top`.
Start โ4Images, audio, video and embeds
Write a figure that contains an image (with `src` and `alt`) and a caption, then an `audio` player with `controls` and a `video` player with `controls`.
Start โ5Semantic page layout
Build the layout: a `header` with an `h1` and a `nav` holding two links, a `main` with a `section` that contains an `article`, an `aside`, and a `footer` with some text.
Start โ6Forms and user input
Build a sign-up form with labelled text, email and password fields, two radio buttons that share the name `level`, a checkbox, a `select` with two `option`s, a `textarea` and a submit button.
Start โPractise the idea
๐จ Play HTML & CSS Lab
Edit a safe sample web page and change its styles in a live preview.
FAQ
How the web works and your first HTML page: common questions
What is the difference between the internet and the web?
The internet is the global network of connected computers and cables. The web is a service on top of it made of pages and links that you open in a browser. Email and online games also use the internet but are not the web.
What does HTML stand for?
HyperText Markup Language. Hypertext means text with links, and markup means labelling content with tags.
Do I need to install anything to write HTML?
No. A plain text editor and a browser are enough, and in this course the editor and a live preview are on the page.
I am stuck. What can I do?
Press Hint for a nudge, read the message next to each goal, and compare your code with the lesson text. If you still need it, Show answer reveals a model solution. Try to type it yourself rather than copy it.
Does my work get saved?
Your ticks and XP are saved in this browser, and in your account if you log in. The code you type is not stored on a server.
Start a conversation
Enjoying coding? Meet a teacher.
Tell us the learner's age, country and what they would like to build, and we will suggest a class. A parent or guardian can make the enquiry.
- Tell us the learnerโs age or grade and goals
- Weโll suggest a suitable class or learning path
- Weโll confirm format, timing and fees with a parent or guardian
Play it, don't just read it
Write some code right now
Free games that need no sign-up. Pick one and play for five minutes.
Pick a game
- Predict the OutputRead a short Python program and choose what it prints. Then watch it runโฆPlay
- Bug HunterA Python program prints the wrong answer. Find the one line with theโฆPlay
- Code BuilderThe lines of a Python program are mixed up. Tap them into the rightโฆPlay
- Code JungleWrite real Python to guide Miko the monkey to every banana. 24 levels:โฆPlay