Webpages are very rarely just in black and white – they usually contain colour to make the content more interesting.
This lesson will look at adding colour to the background of our page and also to our text.
The key thing to remember for this lesson is that we are editing existing tags to add colour, not writing new ones.
To add a background colour to the page, change the <body> tag to <body bgcolor = “[add the colour you want]”>
Note the American spelling of color in the bgcolor
Similarly with paragraphs and headings the existing <p> , <h1> and <h2> tags just need to be edited.
For all three add style= “color:[add your colour here]”
So a <p> tag that we want to be blue would now look like:
<p style = “color:blue”>
For all of the changes in this lesson use the W3Schools page to see a full list of available colours: https://www.w3schools.com/colors/colors_names.asp
© 2023 Tayside Regional Improvement Collaborative
Website by Internet Creation Ltd