Which of the following property defines the style for the left border of an element?

border-style
border-left-style
border-left-width
border-right

The correct answer is: C. border-left-style

The border-left-style property is used to specify the style of the left border of an element. It can be used to set the border to solid, dashed, dotted, double, groove, ridge, inset, or outset.

The border-style property is used to specify the style of all four borders of an element. It can be used to set the borders to solid, dashed, dotted, double, groove, ridge, inset, or outset.

The border-left-width property is used to specify the width of the left border of an element. It can be used to set the border to a specific width, or to inherit the width from the parent element.

The border-right property is used to specify the style of the right border of an element. It can be used to set the border to solid, dashed, dotted, double, groove, ridge, inset, or outset.

Here is an example of how to use the border-left-style property:

css
div {
border-left-style: solid;
border-left-width: 1px;
border-left-color: red;
}

This code will create a solid red border that is 1px wide on the left side of all div elements.

Exit mobile version