Basics
ππ¨ Technique Card
HTML Basics (practical)
Learn how to build your very first web page using simple but powerful HTML tags.
π What youβll learn
- How to write HTML to create a basic web page
- What tags are and how they work
- How to structure your page with headings, paragraphs, and links
π Try this example
Open a text editor like Notepad (or a development environment like VSCode), and save your file as index.html
.
Paste in this code:
<!DOCTYPE html>
<html>
<head>
<title>My First Web Page</title>
</head>
<body>
<h1>Hello, world!</h1>
<p>I made this web page myself using HTML.</p>
<a href="https://google.com">Visit a search engine!</a>
</body>
</html>
π± Save it and double-click the file to open in a browser!
π§© Whatβs going on?
Tag | What it does |
---|---|
<!DOCTYPE> |
Tells the browser this is HTML |
<html> |
The whole page starts and ends here |
<head> |
Hidden info like page title |
<body> |
The part you see in the browser |
<h1> |
Big heading |
<p> |
A paragraph |
<a> |
A link you can click |
π§ͺ Try it yourself!
Change these bits and see what happens:
- Change the
<h1>
text to your name - Add a second paragraph using
<p>Another paragraph!</p>
- Add a second link to a site you like
π You might also need...
π Technique Cards
- Technique Card: working with images in html (practical)
- Technique Card: links and navigation in html (practical)
π Top Tip
Always close your tags like this: <p>...</p>
. If you forget, your page might look a bit strange!