Web
Tim Berners-Lee
Have a go
Now try typing in the HTML below. Check the answers on page 30.
The start of the body of the page
The end of the body of the page
It's a
masterpiece!
Save and refresh to see how each page looks.
Changing the background colour
To change the colour of the page, first we need to add a
<body>
tag to our HTML.
<html>
<body style=
'
background-color:yellow
'
>
<h1 style=
'
color:red
'
>Web</h1>
<p style=
'
color:green
'
>Tim Berners-Lee</p>
</body>
</html>
Now we can add the style ‘attribute’ to set the
background colour:
Save and refresh. The page should look like this:
2
1
<html>
<body>
<h1 style=
'
color:red
'
>Web</h1>
<p style=
'
color:green
'
>Tim Berners-Lee</p>
</body>
</html>
<html>
<h1 style=
'
color:blue
'
>Tim Berners-Lee</h1>
<p style=
'
color:orange
'
>Ada Lovelace</p>
<p style=
'
color:green
'
>Alan Turing</p>
</html>
Text editor – styles.html
<html>
<body style=
'
background-color:black
'
>
<p style=
'
color:yellow
'
>Nelson Mandela</p>
<p style=
'
color:green
'
>Mahatma Gandhi</p>
<p style=
'
color:white
'
>Rosa Parks</p>
</body>
</html>
Text editor – styles.html
Text editor – colour.html
Text editor – colour.html
15
1
2
Browser
//desktop/colour.html