
The CSS border-left-color property settles the color of an element’s left border.
Syntax:
border-left-color: color|transparent;
color – defines the color of the left border.
transparent – the border color will be transparent.
Example:
<!DOCTYPE html>
<html>
<head>
<style>
h4 {
border-left-style: solid;
border-left-color: #2a9d8f;
}
p {
border-style: solid;
border-left-color: #2a9d8f;
}
</style>
</head>
<body>
<h4>A heading with a colored left border.</h4>
<p>A paragraph with a colored left border.</p>
</body>
</html>
Output:
A heading with a colored left border.
A paragraph with a colored left border.
Enjoy coding!
Read also: