how to put background color in html?

You have two options when setting a CSS element, such as a background color. You can either use a style sheet or attach it directly to the object you wish to modify.

For a background, I suggest a style sheet. You can either include a style.css or just use style tags.

Set your document up like this:

<html>
<head>
<title>Title here</title>
<style type="text/css">
CSS STUFF GOES HERE
</style>
</head>

<body>
</body>

</html>

Within that section clearly marked, you can add css elements. Since you want to add the background to the page, you will use the body tag.

body {background-color: red;}

So place that between the style tags.
 
Back
Top