Tutorial

HTML entities in the CSS Content Property

CSS

While this tutorial has content that we believe is of great benefit to our community, we have not yet tested or edited it to ensure you have an error-free learning experience. It's on our list, and we're working on it! You can help us out by using the "report an issue" button at the bottom of the tutorial.

Insert special characters and symbols inside generated CSS content using their hex notation instead of the usual HTML entity notation. For example, © becomes \00a9:

Here’s another example:

.foo::before {
  content: "An ellipsis\2026";
}

Cheatsheet & conversion tool

Creative Commons License