The border-bottom property

The border-bottom property specifies a color, type, and width for a bottom border. It is a shorthand property for border-bottom-width, border-bottom-style and border-bottom-color.

Syntax

cssselector {
  border-bottom: width type color;
}

The order of the properties does not matter.

Example

Let's give the element a black bottom border with 2px width:

html<div id="elem"></div>
css#elem {
  border-bottom: 2px solid black;
  background: #f9f9f9;
  width: 300px;
  height: 100px;
}

Результат: