Set the color of the four borders using CSS

To set the color of the four borders, use the border-color property. You can try to run the following code to set border color for all the borders

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         p {
            border-style: dashed;
            border-color: #808000 #800000 #FF0000 #FFFF00;
         }
      </style>
   </head>
   <body>
      <p>This is demo text with four colored border.</p>
   </body>
</html>

Output

Updated on: 2020-06-21T10:23:16+05:30

83 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements