Open In App

CSS | border-block-start Property

The border-block-start property in CSS is used to define the individual logical block-start border property values in a single place in the style sheet. This property place the border at the top of the defining element. 

Syntax:



border-block-start: border-width|border-style|border-color;

Property values:

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



Example 1: 




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

Output:

  

Example 2: 




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

Output:

  

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


Article Tags :