CSS Intro

CSS Intro Quiz

CSS Intro Exercise

CSS Basic

CSS Basic Quiz

CSS Basic Exercise

CSS Advance

CSS Advance Quiz

CSS Advance Exercise


CSS3 Quiz

CSS3 Exercise

CSS Properties

CSS Functions

CSS Selectors

CSS border top Property

CSS border-top Property



The border-top property is a shorthand property. It is used to set all the top border properties in one declaration. The properties are in the following orders:-

  1. border-top-width
  2. border-top-style
  3. border-top-color




Its syntax is:- border-top: border-width border-style border-color | initial | inherit;


Default Value:-


Its default value is:- medium none color


Further Explanation:-


Value Description
border-top-width Required. Specifies the width of the top border.
border-top-style Required. Specifies the style of the top border.
border-top-color Optional. Specifies the color of the top border.
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Code Explanation

All Tutorials related to CSS Properties

All Sections related to CSS