CSS border Property Reference

The CSS border property is a standard property in CSS Backgrounds and Borders. Review its formal syntax, computed behavior, and practical declarations.

CSS border Property Reference

The CSS border property is a standard property in CSS Backgrounds and Borders. Review its formal syntax, computed behavior, and practical declarations.

Updated 2026-08-12

border overview

The CSS border property is a standard property in CSS Backgrounds and Borders. Review its formal syntax, computed behavior, and practical declarations.

The property is not inherited by default. Use an explicit global keyword when inheritance is intended.

Syntax and formal definition

border formal syntax
FieldValue
Formal syntax<line-width> || <line-style> || <color>
Initial valueborder-width, border-style, border-color
Applies toallElements
InheritedNo
Percentagesno
Computed valueborder-width, border-style, border-color
Animation typeborder-width, border-style, border-color
Mediavisual
Specification groupCSS Backgrounds and Borders
StatusStandard

Practical examples

These declarations demonstrate valid ways to set border. The initial and inherit global keywords remain available even when a property-specific value is preferable.

border live example
CSS .reset-example { border: initial; } .inherit-example { border: inherit; } @supports (border: 1px solid currentColor) { .supported { border: 1px solid currentColor; } }

Description

The CSS border property is a standard property in CSS Backgrounds and Borders. Review its formal syntax, computed behavior, and practical declarations.

References

  1. MDN: border
  2. MDN: CSS Properties Reference

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies