CSS border-block-start-width
The border-block-start-width
property in CSS specifies the width of the block-start border of an element. The block-start side depends on the element’s writing mode, directionality, and text orientation. This property allows you to control the width of the block-start border independently.
Syntax of border-block-start-width
</>
Copy
border-block-start-width: medium | thin | thick | length | initial | inherit;
Values
Value | Description |
---|---|
medium | Specifies a medium border width. This is the default value. |
thin | Specifies a thin border width. |
thick | Specifies a thick border width. |
length | Specifies the width of the border in a specific length unit (e.g., 2px , 1em ). |
initial | Sets the property to its default value (medium ). |
inherit | Inherits the value from its parent element. |
Default Value
medium
Examples for border-block-start-width
Using the CSS border-block-start-width Property
The following examples demonstrate how to use the border-block-start-width
property to set the width of the block-start border.
</>
Copy
/* Set the block-start border width to medium */
.element {
border-block-start-width: medium;
}
/* Set the block-start border width to thin */
.element {
border-block-start-width: thin;
}
/* Set the block-start border width to 5px */
.element {
border-block-start-width: 5px;
}
/* Inherit the block-start border width from the parent */
.element {
border-block-start-width: inherit;
}
Example for Thick Block-Start Border
Below is an example demonstrating how to use border-block-start-width: thick
to apply a thick border to the block-start side:
index.html
</>
Copy
<!DOCTYPE html>
<html lang="en">
<head>
<style>
.box {
width: 300px;
padding: 10px;
border-block-start-width: thick;
border-block-start-style: solid;
}
</style>
</head>
<body>
<h2 class="box">Lorem Ipsum</h2>
</body>
</html>

Example for Block-Start Border Width in Pixels
border-block-start-width: 20px;
index.html
</>
Copy
<!DOCTYPE html>
<html lang="en">
<head>
<style>
.box {
width: 300px;
padding: 10px;
border-block-start-width: 20px;
border-block-start-style: solid;
}
</style>
</head>
<body>
<h2 class="box">Lorem Ipsum</h2>
</body>
</html>

Browser Support
The border-block-start-width
property is supported in modern browsers. Below is a compatibility table:
Browser | Version |
---|---|
Chrome | 69.0 |
Edge | 79.0 |
Firefox | 41.0 |
Safari | 12.1 |
Opera | 56.0 |