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



border-inline-color

CSS (Cascading Style Sheets) is a style sheet language used for describing the presentation of a document written in HTML (Hypertext Markup Language). CSS provides a wide range of properties to style the HTML elements. One of the properties is border-inline-color.

Border-Inline-Color is a CSS property that sets the color of the inline borders of an element. The inline borders are the borders that are on the sides of the element where the text flows. This property is used to style the inline borders of an element separately from the other borders.

The border-inline-color property can be used with the border-inline-style and border-inline-width properties to set the style, width, and color of the inline borders of an element.

Syntax

The syntax for the border-inline-color property is as follows:

selector {
  border-inline-color: color;
}

The selector is the HTML element to which the property is applied. The color is the color of the inline borders. The color can be specified in different formats such as hexadecimal, RGB, RGBA, HSL, HSLA, and color names.

Examples

Let's see some examples of using the border-inline-color property:

Example 1: Setting the color of the inline borders

In this example, we will set the color of the inline borders of a paragraph element to red:

<p style="border-inline-color: red;">This is a paragraph with red inline borders.</p>

The output of the above code will be:

This is a paragraph with red inline borders.

Example 2: Setting the color of the inline borders using RGB value

In this example, we will set the color of the inline borders of a paragraph element to blue using the RGB value:

<p style="border-inline-color: rgb(0, 0, 255);">This is a paragraph with blue inline borders.</p>

The output of the above code will be:

This is a paragraph with blue inline borders.

Example 3: Setting the color of the inline borders using HSL value

In this example, we will set the color of the inline borders of a paragraph element to green using the HSL value:

<p style="border-inline-color: hsl(120, 100%, 50%);">This is a paragraph with green inline borders.</p>

The output of the above code will be:

This is a paragraph with green inline borders.

Example 4: Setting the color of the inline borders using color name

In this example, we will set the color of the inline borders of a paragraph element to orange using the color name:

<p style="border-inline-color: orange;">This is a paragraph with orange inline borders.</p>

The output of the above code will be:

This is a paragraph with orange inline borders.

Conclusion

The border-inline-color property is used to set the color of the inline borders of an element. It can be used with the border-inline-style and border-inline-width properties to set the style, width, and color of the inline borders of an element. The color can be specified in different formats such as hexadecimal, RGB, RGBA, HSL, HSLA, and color names.

Reference

Activity