The border-top-style property sets the line style of an element’s physical top border. It does not set width or color. You can also set this style with border-top or border-style.
The initial value is none, so width or color alone will not draw a top border. Pick a visible style such as solid, dashed, or dotted. For a logical start edge that follows writing mode, use border-block-start-style.
Baseline · Widely available.
Not deprecated and not experimental. Corner joining between different border styles is not fully defined by the specification, so mixed styles may look slightly different across browsers.
A later border-top shorthand resets omitted parts, including style (back to none). Set the longhand after the shorthand if both are needed.
logical
Physical top is not always block-start
In vertical writing modes, use border-block-start-style when the styled edge should follow the logical start side instead of the screen top.
double
double needs enough width
Two lines share the total top width. A thin width can make double look like a single line. Try 6px or more while learning.
corners
Mixed corner styles are undefined
The specification does not define how borders of different styles join at corners. Keep adjacent sides consistent when the join must look identical everywhere.
Compatibility
Browser Support
border-top-style is a browser CSS property for the box model. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
border-top-style
Supported in all modern browsers and Internet Explorer. The side style longhand has been part of CSS since the earliest versions.
100%Universal support
Google ChromeAll versions
Full support
Mozilla FirefoxAll versions
Full support
Apple SafariAll versions
Full support
Microsoft EdgeAll versions
Full support
OperaAll versions
Full support
Samsung InternetAll versions
Full support
Internet ExplorerAll versions
Full support
border-top-styleWidely supported
Bottom line: Safe everywhere for standard top-edge line styles. Prefer the longhand when only the top style should change. It is not a runtime API.
Remember
Key Takeaways
Role: set the line style of the physical top border only.
Initial value:none. A visible style is required for a top border to appear.
Common picks:solid, dashed, and dotted cover most top dividers.
Shorthands:border-top and border-style can set the same style.
One line: set a top style keyword first — without it, the top border stays invisible.
Frequently Asked Questions
It sets the line style of the border on the physical top edge only. It does not set width or color.
The initial style is none, so nothing draws until you set a visible style such as solid or dashed. Width and color alone are not enough.
Both hide the top border and force the used width to 0. In collapsed table borders, none has the lowest priority and hidden has the highest.
border-top-style always styles the physical top edge. border-block-start-style follows writing-mode, so in vertical text it may map to a side instead of the top.
Yes. border-top and border-style can set the top style. Use border-top-style when you want to change only the top edge style.
It is Baseline Widely available and works in all modern browsers and Internet Explorer. It is a browser CSS property, not a Node.js feature.