B4Coder
0%
LessonAbout 4 min

Chapter 1 · Lesson 1 of 4

01. Your first web page

Every web page is HTML: words wrapped in tags that tell the browser what each part is. Make a page with a heading and a sentence.

Every website you've visited, from YouTube to your school's site, is built from HTML. It isn't a programming language: it doesn't calculate or decide. It describes a page: this is a heading, this is a paragraph, this is a picture.

You describe each part by wrapping it in tags. <h1> starts a big heading and </h1> ends it: the / means *close*.

HTML
<h1>Hello, World!</h1><p>This is my first web page.</p>

<h1> is a heading, the biggest one. <p> is a paragraph: ordinary text. The tags themselves don't show on the page; they tell the browser how to show what's between them.

Your turn

1Steps

  1. 1Make a page about your favourite food: an <h1> heading that says My Favourite Food.
  2. 2Under it, add a <p> paragraph that says what the food is and why you like it.

Write it in index.html; the page shows as you type.

2Expected output

Your page should have

  • There's an <h1> heading
  • The heading says My Favourite Food
  • There's a <p> paragraph with some words in it

Submit answer checks each of these.

3Hints

Stuck? Open one hint at a time: each gives a bit more help.

Hint 1

A heading is the words between an opening <h1> and a closing </h1>, just like the Hello, World! page.

Hint 2

Put My Favourite Food between <h1> and </h1> on the first line, then a paragraph on the next line.

Hint 3

The paragraph works the same way: <p> then your sentence then </p>, like <p>Dosa, because it's crispy.</p>