How to set border color in CSS?

by princess.fritsch , in category: HTML/CSS , 2 years ago

How to set border color in CSS?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers

Member

by myrtle , 2 years ago

@princess.fritsch  You can set border color in CSS like this:


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
<head>
  <style>
    p {
      border-style: solid;
      border-color: red;
    }
  </style>
</head>

<body>
  <p>How to set border color in CSS?</p>
</body> 
by jayson.maggio , 7 months ago

@princess.fritsch 

In the above example, the border-style property sets the style of the border to "solid" and the border-color property sets the color of the border to "red". By applying these styles to the <p> element, you can set the border color to red.