CSS2 border property reference guide

CSS2 Border Properties Reference Guide

This is a complete reference guide for web developers, listing all border-related CSS properties defined in the Cascading Style Sheets Level 2 specification, recommended by the World Wide Web Consortium.

Click any property to see its description with examples −

Sr.No. Property & Description
1 border Sets the four borders of an element; the value can be one or more of a color, a border-width, and a border-style.
2 border-bottom Sets the bottom border of an element; value can be one or more of a color, a bottom border-width, and a border-style.
3 border-bottom-width Sets the thickness of an element’s bottom border.
4 border-collapse Sets the rendering algorithm for table borders.
5 border-color Sets the color of the element’s four borders; defaults to the element’s color.
6 border-left-color Sets the color of the element’s left border; the default is the element’s color.
7 border-right-color Sets the color of the element’s right border; the default is the element’s color.
8 border-top-color Sets the color of the element’s top border; the default is the element’s color.
9 border-bottom-color Sets the color of the element’s bottom border; the default is the element’s color.
10 border-left Sets the left border of an element; the value can be one or more of a color, the value of border-left-width, and the value of border-style.
11 border-left-width Sets the thickness of the left border of an element.
12 border-right Sets the right border of an element; the value can be one or more of a color, a value of border-right-width, and a value of border-style.
13 border-right-width Sets the thickness of the right border of an element.
14 border-spacing Sets the spacing between borders when separate borders are set. A single value sets both vertical and horizontal spacing; two values ​​set both horizontal and vertical spacing.
15 border-style Sets the style of an element’s four borders.
16 border-top Sets the top border of an element; the value can be one or more of a color, a border-top-width value, and a border-style value.
17 border-top-width Sets the thickness of an element’s top border.
18 border-width Sets the thickness of the element’s four borders.

Leave a Reply

Your email address will not be published. Required fields are marked *