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

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


The border property is a shorthand property for setting the same width, color, and style for all four borders of a box.


Values [ <border-width> || <border-style> || <border-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: 1px solid red;


    <h1>CSS border property example</h1>

Csslist2 border.png

CSS Reference

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

See also