Open In App

CSS | border-block-color Property

Last Updated : 28 Jun, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

The border-block-color property in CSS is used to set the individual logical block border-color property values in a single place in the style sheet. It sets the border color top, and bottom of the defining border element. 

Syntax:

border-block-color: color;

Property values:

  • color: This property holds the color of the border.

Below examples illustrate the border-block-color property in the CSS: 

Example 1: 

html




<!DOCTYPE html>
<html>
 
<head>
    <title>CSS | border-block-color Property</title>
    <style>
        h1 {
            color: green;
        }
         
        div {
            background-color: yellow;
            width: 220px;
            height: 40px;
        }
         
        .one {
            border: 5px solid cyan;
            border-block-color: yellow;
            background-color: purple;
        }
    </style>
</head>
 
<body>
    <center>
        <h1>Geeksforgeeks</h1>
        <b>CSS | border-block-color Property</b>
        <br><br>
        <div class="one">A Computer Science Portal</div>
    </center>
</body>
 
</html>                   


Output:

  

Example 2: 

html




<!DOCTYPE html>
<html>
 
<head>
    <title>CSS | border-block-color Property</title>
    <style>
        h1 {
            color: green;
        }
         
        div {
            background-color: yellow;
            width: 220px;
            height: 40px;
        }
         
        .one {
            border: 5px dotted cyan;
            border-block-color: yellow;
            background-color: purple;
        }
    </style>
</head>
 
<body>
    <center>
        <h1>Geeksforgeeks</h1>
        <b>CSS | border-block-color Property</b>
        <br><br>
        <div class="one">A Computer Science Portal</div>
    </center>
</body>
 
</html>                   


Output:

  

Supported Browsers: The browsers supported by border-block-color property are listed below:

  • Chrome 87
  • Firefox 66
  • Opera 73
  • Edge 87
  • Safari 14.1


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads