css.properties

border-top

The border-top property shorthand for all top border properties.

Formal Syntax

border-top = <line-width> || <line-style> || <color> <line-width> = <length [0,∞]> | thin | medium | thick <line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset <color> = <color-base> | currentColor | <system-color> | <contrast-color()> | <device-cmyk()> | <light-dark()>

See specification

JavaScript Access

// Access via element.style element.style.borderTop = "See individual properties";

Browser Support

standard | MDN · Spec

FeatureChromeFirefoxSafariEdge
border-top11112
currentColor≤31≤50≤9.1≤15
dashed11112
dotted11112
double11112
groove11112
hidden11112
inset11112
medium11112
none11112
outset11112
ridge11112
solid11112
thick11112
thin11112
transparent11112

Related Properties