HTML Tutorial

Follow the steps in this HTML Tutorial to learn how to write and design your own webpage. Use the playground below to practice your skills.

Previous

Making It Pretty

Next

Changing the Background

Let's start by changing the background color of our web page. Most browsers are set up to automatically use white as the background color, but you can make the background color of your web page any color you want. Go to the HTML Playground and find the <body> tag under Your Code, then add the attribute bgcolor to tell the browser to change the background color. To set pink as the color, for example, change <body> to <body bgcolor="pink">.

It's considered better to use codes that the browser can easily understand to specify colors instead of the colors' names, but we'll just use the names to keep things simple. We've listed both the names and color codes for some common colors here:

beige #F5F5DC black #000000 blue #OOOOFF brown #A52A2A
gold #FFD700 gray #808080 green #008000   maroon #800000
orange #FFA500 pink #FFC0CB   purple #800080 red #FF0000
silver #C0C0C0   turquoise #40E0D0 white #FFFFFF yellow #FFFF00

Or click here for more colors.

HTML Playground

Your Code

The Results