border, border-bottom, border-left, border-right, border-top attribute

Type:border-width? border-style? border-color?
Used By:All block elements
See:border-color border-style border-width

The border attribute is a shortcut method of setting the border-width, border-style and border-color of a box. If the border-left, border-right, border-top or border-bottom attributes are used, then only the border for that side is set - whereas if the border attribute is used, then all the borders are set at once.

To make life easier for users migrating documents from HTML, setting the border width without setting the style will set the style to "solid".

These examples both set the border of the box to a 1pt solid black line

P { border:1 }
P { border:1pt solid }
P { border:1pt solid black }

This sets the bottom border to a dotted red line

P { border-bottom:dotted red }