HTML Colors
HTML Background-color
background colour
<h1 style="background-color:DodgerBlue;">Hello World</h1>
<p style="background-color:Tomato;">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
</p>
Text Color
<h3 style="color:Tomato;">Hello World</h3>
<p style="color:DodgerBlue;">Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
<p style="color:MediumSeaGreen;">Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p>
The <bgcolor> is the attribute to set the background color of an HTML element. This attribute is used with the following tags:
- <body>
- <table>
- <marquee>
- <td>
- <th>
- <tr>
Deprecated <bgcolor>
Usage Examples
1. <body>
tag
Sets the background color of the entire page.
2. <table>
tag
Sets the background color of the table.
3. <marquee>
tag
Sets the background color for the scrolling text.
4. <td>
tag
Sets the background color for a table cell.
5. <th>
tag
Sets the background color for a table header cell.
6. <tr>
tag
Sets the background color for an entire row in a table.
No comments:
Post a Comment