Code Editor
Web Browser
Learn

The color of a border can also be customized with the border-color property.

div.container { border-style: solid; border-width: 3px; border-color: rgb(22, 77, 100); }

The border-color property accepts colors in the various formats you learned about earlier: named colors, RGB(a) colors, and hex colors. It's common to use hex colors for borders, but you'll likely also come across RGB(a) colors as well.

Report a Bug
If you see a bug or any other issue with this page, please report it here.