How to target br element with CSS?

Spread the love

Sometimes, we want to target br element with CSS.

In this article, we’ll look at how to target br element with CSS.

How to target br element with CSS?

To target br element with CSS, we use the br selector.

For instance, we write

br {
  content: "A" !important;
  display: block !important;
  margin-bottom: 1.5em !important;
}

to select br elements with br.

And then we set the styles for them inside the parentheses.

Conclusion

To target br element with CSS, we use the br selector.

Leave a Reply

Your email address will not be published. Required fields are marked *