From Web Education Community Group
< CSS‎ | Properties
Revision as of 11:30, 20 November 2011 by Rworth (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


The border-top property is a shorthand property for setting the width, style, and color of the top border of a box.


Values [ <border-top-width> || <border-top-style> || <border-top-color> ] | inherit
Initial value See individual properties
Applies to all elements
Inherited No


  • inherit
    Takes the same specified value as the property for the element's parent.

And see also individual properties


Example A


 h1 {
   border-top: 1px solid red;


    <h1>CSS border property example</h1>

Csslist2 border.png

CSS Reference

The CSS specification defines the border-top property in 8.5.4 Border shorthand properties.

See also