Web
Tim Berners-Lee
Web
Tim Berners-Lee
We have found out how to add
text and links onto a web page.
Now we’re going to learn how
to change the colour of them.
We will also meet the
<body>
tag, which holds all the things
on the page together.
14
Coloured text
COLOUR IT!
Save your file as
colour.html
then
double-click it to test it so far.
Arrange your desktop so you have your text editor on
the left of the screen and your web browser on the right.
Press the
‘Refresh’
button to
see any
changes.
Edit the second line so it looks like this:
Do spell ‘color’ like this! It’s the American
spelling. Now save and refresh your page:
Edit the third
line so it looks
like this. What
happens?
2
3
4
5
1
Start a new web page in your text editor. Type in:
<html>
<h1 style=
'
color:red
'
>Web</h1>
<p style=
'
color:green
'
>Tim Berners-Lee</p>
</html>
Text editor – colour.html
<html>
<h1>Web</h1>
<p>Tim Berners-Lee</p>
</html>
<html>
<h1>Web</h1>
<p>Tim Berners-Lee</p>
Text editor – colour.html
<html>
<h1
style=
'
color:red
'
>Web</h1>
<p>Tim Berners-Lee</p>
</html>
Text editor – colour.html
Text editor
Click ‘File’
then ‘Save’
after any
changes.
Experiment by
typing orange, blue
and other colours
instead of red.
colour.html
Browser
//desktop/colour.html
Browser
//desktop/colour.html