How to add HTML entities using CSS content?

Spread the love

Sometimes, we want to add HTML entities using CSS content.

In this article, we’ll look at how to add HTML entities using CSS content.

How to add HTML entities using CSS content?

To add HTML entities using CSS content, we set the content CSS property.

For instance, we write

.breadcrumbs a:before {
  content: "\0000a0";
}

to select the first child of the .breadcrumbs a element with the before pseudo-element.

And we set its content to "\0000a0" to show that as the content of the first child of .breadcrumbs a.

Conclusion

To add HTML entities using CSS content, we set the content CSS property.

Leave a Reply

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