</> Code Corner

HTML · HTML Tutorial · Lesson 34

HTML Entities

Reserved characters like < > & and non-breaking spaces.

Reserved characters in HTML must be replaced with entities. For example, to display a less-than sign you write &lt;.

Result Description Entity name
  non-breaking space &nbsp;
< less than &lt;
> greater than &gt;
& ampersand &amp;
" double quote &quot;
© copyright &copy;
® registered trademark &reg;

Example

<p>5 &lt; 10 &amp;&amp; 10 &gt; 5</p>
<p>&copy; 2026 Code Corner</p>
<p>10&nbsp;km stays together</p>
Tip: Entity names are case sensitive. You can also use numbers, e.g. &#60; for <.

Keep reading “HTML Entities”

Sign up to read the full lesson, try every example in the live editor, and take the 5-question quiz.

Chat with us 👋