To set the color of the right border, use the border-right-color property. You can try to run the following code to implement border-color-property −
Example
<!DOCTYPE html> <html> <head> <style> p { border-style: dotted; border-right-color: #FFFF00; } </style> </head> <body> <p>This is demo text.</p> </body> </html>