Home
CSS
CSS Borders
Border Color
Tryit: Border color with HSL values
Run ❯
Get your
own
website
Result Size:
625 x 534
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <head> <style> p.one { border-style: solid; border-color: hsl(0, 100%, 50%); /* red */ } p.two { border-style: solid; border-color: hsl(240, 100%, 50%); /* blue */ } p.three { border-style: solid; border-color: hsl(0, 0%, 73%); /* grey */ } </style> </head> <body> <h2>The border-color Property</h2> <p>The color of the border can also be specified using HSL values:</p> <p class="one">A solid red border</p> <p class="two">A solid blue border</p> <p class="three">A solid grey border</p> </body> </html>