CSS Property border-bottom

This shorthand property defines the width, color, and style of the bottom border.


Initial value not specified
Inherited No.
Version CSS1
JavaScript syntax object.style.borderBottom="5px solid red"
Applies to All elements.

CSS Syntax

border-bottom: border-width border-style border-color;

Property Values

The property values are listed in the following table.

Value Description
border-bottom-width Set the width of the bottom border
border-bottom-style Set the style of the bottom border
border-bottom-color Set the color of the bottom border
inherit Inherit the border-bottom property from the parent element

Browser compatibility

border-bottom Yes Yes Yes Yes Yes


An example showing how to use border-bottom CSS property.

span {<!--  w  ww  . ja  v  a  2 s  .  c om-->
  border-bottom: 1px dotted black;
    <span>Under 5</span>

Click to view the demo