CSS border-left property

CSS border-left property

Description

Sets the left border of an element; value can be one or more of: color, border-left-width, and border-style.

Possible values

Can be one or more of: color, border-width, and border-style.

Applies to

All HTML elements.


DOM syntax

object.style.borderLeft = "2px solid red"; 

Example

The border-left property allows you to specify the color, style, and width of the left line in one property.

Here is an example using these three properties, combining them into a single property.

<html> 
<head> 
</head> 

<body> 
<p style = "border-left:4px solid red;"> 
This example is showing shorthand property for border-left. 
</p> 
</body> 
</html> 

This will produce the following result −

CSS border-left property

Leave a Reply

Your email address will not be published. Required fields are marked *