Learn it
Every web page is made of HTML, which describes the content (headings, paragraphs, pictures). CSS describes how it looks (colours, sizes, layout). Your browser reads them and draws the page.
HTML uses tags in angle brackets. Most come in pairs: <p> opens and </p> closes.
π§° Tool: a free online editor such as CodePen or JSFiddle, or a plain text editor and your web browser.
Code examples
HTML
<!DOCTYPE html>
<html>
<head>
<title>My First Page</title>
</head>
<body>
<h1>Hello, web!</h1>
<p>This is my very first web page.</p>
</body>
</html>
The head holds information about the page; the body holds what you see.
Project: First page
- Open CodePen (or a text editor, saving as index.html).
- Type the example.
- Change the heading and paragraph to be about you (nickname only).
- Look at the result.
Challenge: Right-click any web page and choose ‘View page source’ to peek at its HTML.