CSS border-block

The border-block property in CSS is a shorthand property that allows you to set the border properties for all four block-start and block-end sides of an element. This property is part of the CSS Box Alignment module Level 3.

The syntax for the border-block property is:


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

Where:

Let's see an example of how to use the border-block property:

Result:

This is a text with a border defined using the border-block property.

In this example, we have set a 2px dashed border with color #333 around the text using the border-block property.