CSS | border-block-style Property
The border-block-style property in CSS is used to set the individual logical block border-style property values in a single place in the style sheet. It sets the border style top, and bottom of the defining border element.
Syntax:
border-block-style: style;
Property values:
- style: This property holds the style of the border dashed, border, dotted, etc.
Below examples illustrate the border-block-style property in the CSS:
Example 1:
html
<!DOCTYPE html><html><head> <title>CSS | border-block-style Property</title> <style> h1 { color: green; } div { background-color: yellow; width: 220px; height: 40px; } .one { border: 5px solid cyan; border-block-style: dashed; background-color: purple; } </style></head><body> <center> <h1>Geeksforgeeks</h1> <b>CSS | border-block-style 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-style Property</title> <style> h1 { color: green; } div { background-color: yellow; width: 220px; height: 40px; } .one { border: 5px dotted cyan; border-block-style: solid; background-color: purple; } </style></head><body> <center> <h1>Geeksforgeeks</h1> <b>CSS | border-block-style Property</b> <br><br> <div class="one">A Computer Science Portal</div> </center></body></html> |
Output:
Supported Browsers: The browsers supported by border-block-style property are listed below:
- Chrome 87 and above
- Edge 87 and above
- Firefox 66 and above
- Opera 73 and above
- Safari 14.1 and above





Please Login to comment...