css
Change color of <hr> element using CSS
October 25, 2022
The hr HTML element is used to create a horizontal line across the page. By default, the line is black. However, you can change the color of the line using CSS.
hr {
height: 2px;
background-color: #ff0000;
border: none;
}
Was this helpful?
Similar Posts
- Change font color CSS
- Change Last element style using CSS
- Apply :hover on element:after and element:before using CSS
- Remove chrome browser autofill background color CSS
- Customize placeholder color in CSS
- Remove (WebKit) Chrome browser autofill background color CSS
- Bottom box shadow only to element in CSS