Which of the following property specifies the width of a border?

border-color
border-style
border-width
border-bottom-color

The correct answer is C. border-width.

The border-width property specifies the width of the border around an element. It can be specified as a single value, which applies to all four sides of the element, or as four values, one for each side. The values can be any length unit, such as pixels, ems, or percentages.

The border-color property specifies the color of the border around an element. It can be specified as a single color, which applies to all four sides of the element, or as four colors, one for each side. The colors can be any valid CSS color value.

The border-style property specifies the style of the border around an element. It can be specified as a single value, which applies to all four sides of the element, or as four values, one for each side. The values can be any of the following:

  • solid: A solid border.
  • dashed: A dashed border.
  • dotted: A dotted border.
  • double: A double border.
  • groove: A groove border.
  • ridge: A ridge border.
  • inset: An inset border.
  • outset: An outset border.

The border-bottom-color property specifies the color of the bottom border around an element. It can be specified as a single color, or as a percentage. The color can be any valid CSS color value.

For example, the following CSS code will create a red, solid border with a width of 2px around an element:

border: 2px solid red;

The following CSS code will create a red, dashed border with a width of 2px on the top and bottom sides of an element, and a blue, solid border with a width of 1px on the left and right sides of an element:

border-top: 2px dashed red;
border-bottom: 2px dashed red;
border-left: 1px solid blue;
border-right: 1px solid blue;