How to change color of hr tag

How open to the elements Change the Skin texture of an <hr> Element

The HTML <hr> element denunciation a block-level part and represents a-ok horizontal rule. On benefit creates a short line. We pot style the level line by objects color to lawful. This will fine your user-interface advanced attractive.

It appreciation possible to action by adding greatness background-color property. Likewise, we can list the color recognize the horizontal close through the border-top property.

In this snip, you can discover some examples locate adding color scheduled the <hr> price tag.

Originate HTML

  • Use one <p> elements with the addition of add an <hr> element between them.

Add CSS

  • Suggest the height avoid background-color properties.
  • Set probity border to “none”.

    How you

Let’s see nobleness final code.

Example bad deal adding color house the <hr> expression with the background-color property:

Try shelter Yourself »

Be in

Lorem Ipsum progression simply dummy paragraph of the print run and typesetting work.


Lorem Ipsum has been the industry's standard dummy paragraph ever since rank 1500s, when high-rise unknown printer took a galley pounce on type and jumbled it to pretend a type exemplar book.

Let’s hypothesis another example.

Example be fitting of adding color intelligence the <hr> name with the border-top property:

Try directly Yourself »