HTML Background Color
Attributes never stand alone. Instead, they always appear inside a body tag. So bgcolor and text attributes are placed in <body> tag.
Example: 1
<html>
<head>
<title>Page with Back Color</title>
</head>
<body bgcolor="#00ff00">
The color of the Page is green and text is default color(black).
</body>
</html>
<head>
<title>Page with Back Color</title>
</head>
<body bgcolor="#00ff00">
The color of the Page is green and text is default color(black).
</body>
</html>
Output

Example: 2
<html>
<head>
<title>Color Page</title>
</head>
<body bgcolor="#00ff00" text="#ff0000">
The color of the Page is green and text is red.
></body>
</html>
<head>
<title>Color Page</title>
</head>
<body bgcolor="#00ff00" text="#ff0000">
The color of the Page is green and text is red.
></body>
</html>
Output

No comments:
Post a Comment