CSS CSS Tutorial CSS Advanced CSS Responsive Web Design(RWD) CSS Grid CSS Properties Sass Tutorial Sass Functions



border-block-end-color

CSS or Cascading Style Sheets is a style sheet language used for describing the presentation of a document written in HTML or XML. It is used to style web pages and user interfaces written in HTML and XHTML. CSS provides a wide range of properties to style the elements of a web page. One such property is the border-block-end-color property.

Brief Explanation of Border-Block-End-Color

The border-block-end-color property is used to set the color of the bottom border of an element. It is a part of the CSS Box Model and is used to style the block-end border of an element. The block-end border is the bottom border of an element in a vertical writing mode. It is also known as the "after" border in the CSS Box Model.

The border-block-end-color property can be used with other border properties such as border-block-end-style and border-block-end-width to create a complete border for an element. It is supported by all major web browsers including Google Chrome, Mozilla Firefox, Safari, and Microsoft Edge.

Code Examples

Here are some code examples to illustrate the usage of the border-block-end-color property:

Example 1:

In this example, we will set the color of the block-end border of a div element to red:

    
        <div style="border-block-end-color: red;">
            This is a div element with a red block-end border.
        </div>
    

Example 2:

In this example, we will set the color, style, and width of the block-end border of a div element:

    
        <div style="border-block-end: 2px solid blue;">
            This is a div element with a blue block-end border of 2 pixels width and solid style.
        </div>
    

Example 3:

In this example, we will set the color of the block-end border of a table element:

    
        <table style="border-collapse: collapse;">
            <tr>
                <td style="border-block-end-color: green;">Cell 1</td>
                <td>Cell 2</td>
            </tr>
            <tr>
                <td>Cell 3</td>
                <td style="border-block-end-color: green;">Cell 4</td>
            </tr>
        </table>
    

In this example, we have set the color of the block-end border of the first and last cells of each row of a table to green.

Conclusion

The border-block-end-color property is a useful CSS property that can be used to style the block-end border of an element. It can be used with other border properties to create a complete border for an element. It is supported by all major web browsers and can be used to create visually appealing web pages and user interfaces.

References

Activity