CSS border-color Property

Last Updated Jul 21, 2015, 12:00:06 PM





CSS border-color Property

The CSS border-color property is a shorthand for setting the color of the four sides of an element's border

CSS border-color property is used to set the css border color for an element four borders

Syntax

How to set the borders on four sides.

Settings all four borders as pink

Setting top and bottom borders as pink,right and left borders as blue

Setting top border as pink, right and left borders as green, bottom border as blue

Setting top border as red, right border as green, bottom border as blue, left border as pink

Example
Watch GIF Try It Now

CSS Borders Reference



All CSS Border Properties

Other CSS Border Properties you might want to learn

CSS border-left-width Property

CSS border-right Property

CSS border-right-color Property

CSS border-right-style Property

CSS border-top Property

CSS border-top-color Property

CSS border-top-style Property

CSS border-top-width Property



Sources and Credits

The source of the content has been referred and updated with Mozilla Foundation and W3C Organization

Last Updated Jul 21, 2015, 12:00:06 PM