CSS

All Languages C CPP JAVA HTML CSS JAVASCRIPT PYTHON

CSS Borders

The border property is a shorthand syntax in CSS that accepts multiple values for drawing a line around the element it is applied to.
.box {
  border: 3px solid red;
  height: 200px;
  width: 200px;
} 

Values

The border property accepts one or more of the following values in combination:
border: <border-width> || <border-style> ||

Browser Support

You can count on excellent support for the border property across all browsers.
Chrome Safari Firefox Opera IE Android iOS
Any Any Any 3.5+ 4+ Any Any

Related Properties

What we covered here is specific to the border property, but there are other properties that provide even more options for styling borders.