Extensible HyperText Markup Language

XHTML.com recommends: PSD to HTML Slicing Service

border-color

Definition

The border-color property specifies the color of the element's four borders. Border is the space between the element's padding and the element's margin, as represented by the yellow highlighted area in the illustration below.

Illustration of the CSS box model. The area between padding and margin is highlighted in yellow.

Example

  1. h1 {border-color: red green blue black}
  2. h2 {border-color: silver #eeeeee}

Characteristics

Possible values

  • One, two, three or four color values which can include the keyword transparent. If there is only one value, it applies to all borders. If there are two values, the top and bottom borders are set to the first value, and the right and left borders are set to the second. If there are three values, the top is set to the first value, the left and right borders are set to the second, and the bottom border is set to the third. If there are four values, they apply to the top, right, bottom, and left borders, respectively.
  • inherit
    Use the same computed value as the parent element for this property.

Default value

Depends on Web browser

Applies to

Inherited

No

See also