What is the CSS border-top-width property?
The border-top-width property in
We should declare the
border-styleandborder-top-styleproperty before using theborder-top-widthproperty because the width is only changed when the element has some border.
Syntax
border-top-width: medium|thin|thick|length|initial|inherit;
Property values
-
thin: It is used to specify that the top border is thin. -
thick: It is used to specify that the top border is thick. -
length: It is used to define the thickness of the top border. -
medium: It is the default value and is used to specify that the top border is medium. -
initial: It is used to set the value to its default value. -
inherit: It is used to inherit property from its parent value.
Code
The following is the basic border-top-width property.