CSS border-top-width Property


In CSS, the border-top-width property is used to specify the width of an element's top border. Before using the border-top-width property, the element is given the border-top-style or border-style property.

Syntax

Example

Preview

Property Values

Value Description
medium This option specifies a medium top border. This is the default setting.
thin This option specifies a thin top border.
thick This option specifies a thick top border.
length You can specify the thickness of the top border. Learn more about length units.
initial This property is set to its default value.
inherit This property is inherited from its parent element.

Supported Browsers

Element Chrome Firefox Safari Edge / IE Opera
border-top-width 1.0 1.0 1.0 4.0 3.5