“I want to write the < symbol in my text, but for some reason it won’t show up on screen…” — the thing is, in HTML, < and & are treated specially, as cues for tags. Write them directly and the browser gets the wrong idea: “oh, is a tag starting here?” The way to show such symbols properly as plain characters is the entity reference.
Why can’t you just write them?
The reason is simple: < is the start of a tag, and & is the start of an entity reference. When the browser sees these two, it braces itself: “is this a command?” So when you want to show them as ordinary characters, you swap in the code word to tell it “this is just a symbol.”
Commonly used entity references
Just these few are all you really need to remember.
| Character to show | How to write it | Where the name comes from |
|---|---|---|
< | < | less than |
> | > | greater than |
& | & | ampersand |
" | " | quotation |
© | © | copyright |
| (a space that won’t break) | | non-breaking space |
For example, say you want to show the literal way to write a “p tag” inside an article.
<p>A paragraph is written as <p>.</p>< and > appear on screen as the < and > symbols, not as a tag.Written this way, the screen shows A paragraph is written as <p>. with the symbols intact. Thanks to swapping in < and >, the browser didn’t mistake them for a tag.
You can show symbols and marks too
Beyond plain characters, you can also show symbols that aren’t on your keyboard. For the copyright mark you often see in footers, it’s like this.
<p>© 2026 Shima</p>© in the code, on screen it turns into the © mark just fine.© turns into ©. There are lots of other arrows and special marks available too.
You can also write them by number
Besides &name;, entity references also have a &#number; form. For ©, this gives the same result.
<p>© 2026 Shima</p>© instead of the name ©, the same © mark appears.| How to write it | Character shown |
|---|---|
© (by name) | © |
© (by number) | © |
The number points to a Unicode value — a character number shared worldwide. Names are easier to remember and read, so for everyday use a named form like © is plenty. Just knowing “there’s also a way to write it by number” means you won’t be thrown off when you see it in someone else’s code.
Summary of this lesson
<>&get special treatment. To show them as characters, use an entity reference<>&— start with&, close with;- With UTF-8, Japanese and emoji stay as-is. Entity references are needed for mainly three characters