- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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
<!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
- Related Articles
- Set the color of the right border using CSS
- Effect of Color Property on Borders and Outlines in CSS
- Set the Color of links with CSS
- Set the color of the border with CSS
- Set the color of the outline with CSS
- Set the link color with CSS
- Collapsing Table Borders using CSS
- Set the color of the text decoration in CSS
- Set the Color of Visited Links with CSS
- Set the color of the rule between columns with CSS
- Add borders to pagination using CSS
- Adding Borders to Tables using CSS
- Set the background color of an element with CSS
- Setting the Color of Links using CSS
- Set the opacity for the background color with CSS

Advertisements