CSS border top width

CSS border top width is used to set the top border width for html element. The border top for an html element can be display using three properties combination. These three properties are CSS border-top-width, CSS border-top-style and CSS border-top-color.

The syntax for CSS border-top-width is:

For Example:

Output

This is the HTML paragraph inside the div for background size text. This div used to show the border top. This border has given here to display border.

CSS border top width values list

The values and description of this property is used for CSS border top width to specify the border.

Sr. No. value Description
1 border-width Used to give width of border. The value for this can be in pixel format or percentage format. Check CSS border-width for more detail.
2 initial Used to define as the property initial value.
2 inherit Used to define the computed value of property on the elements parent.

CSS border top widthr dotted

In this example we will use to show dotted border-top.

For Example:

Output

This is the HTML paragraph inside the div for background size text. This div used to show the border top. This border has given here to display border.