For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/css/properties/border-color.md.
Lynx
  • English
  • border-color

    Introduction

    The border-color shorthand CSS property sets the color (border-top-color, border-right-color, border-bottom-color, border-left-color) of an element's border.

    Examples

    Syntax

    /* border-color: color; */
    border-color: red;
    
    /* border-color: vertical horizontal; */
    border-color: red #f015ca;
    
    /* border-color: top horizontal bottom; */
    border-color: red yellow green;
    
    /* border-color: top right bottom left; */
    border-color: red yellow green blue;

    Values

    The <color> property may be specified using one, two, three, or four values.

    Formal definition

    Initial valuetransparent
    Applies toall elements
    Inheritedno
    Animatableyes

    Formal syntax

    <color>{1, 4}

    Compatibility

    LCD tables only load in the browser

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.