Web development
All About Me
Write your first web page in HTML: headings, a paragraph, lists, a link and an emoji, all about you.
Every website you have ever visited is made of HTML, the language that tells a browser what is on a page. Today you will write a page about the most interesting person you know: you.
You will learn
- Write HTML tags, which open and close
- Make headings, paragraphs and lists
- Make words bold and italic
- Link to another website
You will need
- A computer with a web browser
- The Web Studio, or Notepad
Words to know
- HTML
- HyperText Markup Language: the code for what is on a web page.
- tag
- A word in angle brackets, such as
<p>. Most have a closing tag, such as</p>. - element
- An opening tag, its content and its closing tag, together.
- attribute
- Extra information inside an opening tag, such as
hrefin a link.
Step by step
Step 1: Open your project
Open the Web Studio in a new tab and choose Day 1: All About Me from the Project list. It starts with this page.
HTML is made of tags in angle brackets. Most come in pairs:
<h1>starts a big heading and</h1>ends it. Everything you see goes between<body>and</body>. The part between<head>and</head>is information about the page, such as its<title>, which shows on the browser's tab.1<!DOCTYPE html>2<html>3 <head>4 <meta charset="utf-8">5 <title>All about me</title>6 </head>7 <body>8 <h1>Hello!</h1>9 </body>10</html>The page so far: one heading. Step 2: Say who you are
Change the heading to say your name. Then add a paragraph,
<p>, about you.New: lines 8 and 9.
1<!DOCTYPE html>2<html>3 <head>4 <meta charset="utf-8">5 <title>All about me</title>6 </head>7 <body>8 <h1>Hi, I am Sam!</h1>9 <p>I am in Year 7 and I love coding, football and loud music.</p>10 </body>11</html>Your name in a heading, and a paragraph about you. Step 3: A list of favourites
<h2>is a smaller heading.<ul>makes an unordered list, one with bullet points, and each item goes in its own<li>, a list item.New: lines 10 to 16.
1<!DOCTYPE html>2<html>3 <head>4 <meta charset="utf-8">5 <title>All about me</title>6 </head>7 <body>8 <h1>Hi, I am Sam!</h1>9 <p>I am in Year 7 and I love coding, football and loud music.</p>10 11 <h2>My favourite things</h2>12 <ul>13 <li>Food: pizza</li>14 <li>Animal: otter</li>15 <li>Colour: green</li>16 </ul>17 </body>18</html>A heading, then three favourite things with bullet points. Step 4: Bold and italic
Wrap a word in
<strong>to make it bold, or in<em>(for emphasis) to make it italic.New: line 9.
1<!DOCTYPE html>2<html>3 <head>4 <meta charset="utf-8">5 <title>All about me</title>6 </head>7 <body>8 <h1>Hi, I am Sam!</h1>9 <p>I am in Year 7 and I love <strong>coding</strong>, football and <em>very</em> loud music.</p>10 11 <h2>My favourite things</h2>12 <ul>13 <li>Food: pizza</li>14 <li>Animal: otter</li>15 <li>Colour: green</li>16 </ul>17 </body>18</html>Coding is now bold, and very is in italics. Step 5: A numbered list
<ol>is an ordered list: the browser numbers the items for you. Add three facts about yourself.New: lines 17 to 23.
1<!DOCTYPE html>2<html>3 <head>4 <meta charset="utf-8">5 <title>All about me</title>6 </head>7 <body>8 <h1>Hi, I am Sam!</h1>9 <p>I am in Year 7 and I love <strong>coding</strong>, football and <em>very</em> loud music.</p>10 11 <h2>My favourite things</h2>12 <ul>13 <li>Food: pizza</li>14 <li>Animal: otter</li>15 <li>Colour: green</li>16 </ul>17 18 <h2>Three facts about me</h2>19 <ol>20 <li>I have two cats.</li>21 <li>I can juggle three balls.</li>22 <li>I once ate ten pancakes.</li>23 </ol>24 </body>25</html>Three facts, numbered 1, 2 and 3. Step 6: Link to a website
<a>makes a link. Itshrefsays where the link goes, and the words between the tags are what you click.hrefis an attribute: extra information written inside the opening tag.New: lines 24 to 26.
1<!DOCTYPE html>2<html>3 <head>4 <meta charset="utf-8">5 <title>All about me</title>6 </head>7 <body>8 <h1>Hi, I am Sam!</h1>9 <p>I am in Year 7 and I love <strong>coding</strong>, football and <em>very</em> loud music.</p>10 11 <h2>My favourite things</h2>12 <ul>13 <li>Food: pizza</li>14 <li>Animal: otter</li>15 <li>Colour: green</li>16 </ul>17 18 <h2>Three facts about me</h2>19 <ol>20 <li>I have two cats.</li>21 <li>I can juggle three balls.</li>22 <li>I once ate ten pancakes.</li>23 </ol>24 25 <h2>A website I like</h2>26 <p>I learn new things at <a href="https://www.bbc.co.uk/bitesize">BBC Bitesize</a>.</p>27 </body>28</html>BBC Bitesize is a link. Step 7: Finishing touches
Add a waving hand after your name:
👋is the code for the emoji. Then add<hr>, a line across the page, before the last section.<hr>is one of the few tags with no closing tag. Then click Download to keep your page.New: lines 8, 25 and 26.
1<!DOCTYPE html>2<html>3 <head>4 <meta charset="utf-8">5 <title>All about me</title>6 </head>7 <body>8 <h1>Hi, I am Sam! 👋</h1>9 <p>I am in Year 7 and I love <strong>coding</strong>, football and <em>very</em> loud music.</p>10 11 <h2>My favourite things</h2>12 <ul>13 <li>Food: pizza</li>14 <li>Animal: otter</li>15 <li>Colour: green</li>16 </ul>17 18 <h2>Three facts about me</h2>19 <ol>20 <li>I have two cats.</li>21 <li>I can juggle three balls.</li>22 <li>I once ate ten pancakes.</li>23 </ol>24 25 <hr>26 27 <h2>A website I like</h2>28 <p>I learn new things at <a href="https://www.bbc.co.uk/bitesize">BBC Bitesize</a>.</p>29 </body>30</html>Your finished page, all about you.
Test it
Tick each one when it works. If one does not, look back at the step it comes from.
Stretch challenges
Finished early? Try these. Each one has a hint if you get stuck.
More emoji
Put an emoji next to each of your favourite things.
Show a hint
Some codes:
🍕pizza,🦦otter,⚽football,🎮games. Or copy and paste an emoji straight into the code.A table
Add a timetable of your week as a table.
Show a hint
A table is
<table>, each row is a<tr>, and each cell is a<td>. Use<th>for the cells in the heading row.Show one answer
1<!DOCTYPE html>2<html>3 <head>4 <meta charset="utf-8">5 <title>All about me</title>6 </head>7 <body>8 <h1>Hi, I am Sam! 👋</h1>9 <p>I am in Year 7 and I love <strong>coding</strong>, football and <em>very</em> loud music.</p>10 11 <h2>My favourite things</h2>12 <ul>13 <li>Food: pizza</li>14 <li>Animal: otter</li>15 <li>Colour: green</li>16 </ul>17 18 <h2>Three facts about me</h2>19 <ol>20 <li>I have two cats.</li>21 <li>I can juggle three balls.</li>22 <li>I once ate ten pancakes.</li>23 </ol>24 25 <hr>26 27 <h2>A website I like</h2>28 <p>I learn new things at <a href="https://www.bbc.co.uk/bitesize">BBC Bitesize</a>.</p>29 <h2>My week</h2>30 <table>31 <tr><th>Day</th><th>After school</th></tr>32 <tr><td>Monday</td><td>Coding Club</td></tr>33 <tr><td>Wednesday</td><td>Football</td></tr>34 <tr><td>Friday</td><td>Film night</td></tr>35 </table>36 </body>37</html>A picture
Add a picture with the
<img>tag.Show a hint
<img src="picture.png" alt="What the picture shows">shows a picture.srcis where the picture is, andaltdescribes it for anyone who cannot see it. With Notepad, put the picture file in the same folder as the page.
The finished code
Show the whole page
1<!DOCTYPE html>2<html>3 <head>4 <meta charset="utf-8">5 <title>All about me</title>6 </head>7 <body>8 <h1>Hi, I am Sam! 👋</h1>9 <p>I am in Year 7 and I love <strong>coding</strong>, football and <em>very</em> loud music.</p>10 11 <h2>My favourite things</h2>12 <ul>13 <li>Food: pizza</li>14 <li>Animal: otter</li>15 <li>Colour: green</li>16 </ul>17 18 <h2>Three facts about me</h2>19 <ol>20 <li>I have two cats.</li>21 <li>I can juggle three balls.</li>22 <li>I once ate ten pancakes.</li>23 </ol>24 25 <hr>26 27 <h2>A website I like</h2>28 <p>I learn new things at <a href="https://www.bbc.co.uk/bitesize">BBC Bitesize</a>.</p>29 </body>30</html>Notes for the teacher
Timing
- 10 minutes: open the Studio and look at the first page together. Point out the opening and closing tags.
- 30 minutes: steps 2 to 7.
- 10 minutes: the tests, then students swap computers and read each other's pages.
Mistakes to look out for
- A missing closing tag, such as
</h1>: everything after it becomes part of the heading. - Tags closed in the wrong order, such as
<strong><em>hi</strong></em>. Inner tags close first. - A missing
"inhref="...": the link swallows the rest of the line. - Personal details: remind students not to put their full name, school or address on a page they might share.
Going further
Right click any web page and choose View page source to see its HTML. Students are often amazed that a big site is made of the same tags they have just used.