CSS border-top Property


CSS's border-top property is used to set all top border properties in a single line. This property specifies the width, style, and color of the top border.

Syntax

Example

Preview

Property Values

Value Description
border-top-width Required. The width of the top border is specified. The default setting is "medium."
border-top-style Required. The top border style is specified here. The default value is "none."
border-top-color Optional. The color of the top border is specified here. The color of the text is the default value.
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 1.0 1.0 1.0 4.0 3.5