The border-color shorthand sets the color of all four border sides. Accepts 1 (all), 2 (vertical/horizontal), 3 (top/horizontal/bottom), or 4 (top/right/bottom/left) values. Level 4 also accepts <image-1D> (a gradient along the side)..box {
border-color: black;
}.box {
border-color: red green blue gold;
}currentColorUses the element's current color value (default).transparentFully transparent color.rgb()RGB color function.hsl()HSL color function.hwb()HWB color function.lab()CIE Lab color function.lch()CIE LCH color function.oklab()Oklab color function.oklch()Oklch color function.color()Generic color function for custom color spaces.light-dark()Selects between two color values per color-scheme.linear-gradient()Linear color gradient (as <image-1D>, new in L4).CSS Borders Module Level 4Working Draft<color>W3CMDNCSSShow all codeEdit CSS onlineThe plugin that remembers hundreds of CSS items for youEvery CSS property — in a live demonstrationThe bilingual CSS referencedefinitionexamplessyntaxmodulespecificationvalue typessourcesvisual demonstrationpreviousnext