Search within TutorialsPark

CSS border Property


A shorthand to set all border properties in a single declaration


Definition and Notes.

1. The CSS border property is a shorthand to set mulitple border properties in a single declaration.

2. If the border style is not specified, no borders would be created .


Syntax:

CSS border property. internetexplorer safari firefox opera chrome

View in Splitscreen»

Code-Editor:

Note-Colors can be set using keywords, Hex, rgba() or hsla() colors

Property Values

Value Description
<'border-width'> To set the width of the border.
<'border-style'> To specify the border-style.
<color> To specify the color of the border.

Specifications

Specs Value
Name border
Value <'border-width'> || <'border-style'> || <color>
Initial Value Refer to individual properties
Applies to All elements
Javascript syntax object.style.border="5px solid #444"
Inherited No
Computed Value Same as declared Value
Browser Support internetexplorer safari firefox opera chrome

Related Examples.