HTML CSS IMAGES LINKS
 
HTML → Background Color

All attributes discussed on this page have been deprecated. A deprecated element or attribute is one that has been outdated by newer constructs. In general, authors should use style sheets to achieve stylistic and formatting effects rather than HTML presentational attributes. HTML presentational attributes have been deprecated when style sheet alternatives exist. Almost all attributes that specify the presentation of an HTML document (e.g., colors, alignment, fonts, graphics, etc.) have been deprecated in favor of style sheets.

Setting a Background Color for Your Page

<html>
<head>
<title>HTML Web Construction</title>
</head>
<body bgcolor="#ffffff">
</body>
</html>

We said that every HTML page has a <body> tag. On Mac OS9, the default background color was gray. On the PC, the background color always defaulted to white. To make certain that the background color is white on both the Mac and PC, we must add the following attribute to our body tag: <body bgcolor="#ffffff">

Remember: We are NOT ADDING another body tag. Rather, we are INSERTING an attribute in the existing body tag. Tags may have multiple attributes.





 
  back ↑