Defines the properties for a pre-defined content block in a document.
Browser/User Agent Support
| IE | Netscape | Mozilla | Opera | Safari |
|---|---|---|---|---|
| 2.0+ | 2.0+ | 1.0+ | 4.0+ | 1.0+ |
Example
This example colors the background for all divs yellow and gives them a red font:
div {
background-color: yellow;
color: red;
}
Remarks
Usually, you will assign a class or id to a div to style it, rather than styling all divs.


