Skip to content
HTML Entities & Symbols Explained — Special Characters & Emojis

HTML Entities & Symbols Explained — Special Characters & Emojis

DodaTech Updated Jun 6, 2026 7 min read

HTML entities represent characters that have special meaning in HTML or aren’t available on your keyboard — like &lt; for <, &copy; for ©, and emojis like 😊.

What You’ll Learn

By the end of this tutorial, you’ll know how to use HTML entities for reserved characters (like <, >, &), common symbols (copyright, currency, math operators), non-breaking spaces, and emojis.

Prerequisite: You should know basic HTML. HTML Basics covers everything you need.

Why Entities Matter

Think of HTML entities like secret codes. You can’t type < directly in HTML because the browser thinks it’s the start of a tag. So you use &lt; (less-than) as a code that the browser converts to <.

Real-world use: Every tutorial that shows code examples uses entities (like this page). Every footer uses &copy; for the copyright symbol. Currency symbols, math signs, and non-breaking spaces are everywhere.

Where This Fits in Your Learning Path

    flowchart LR
    A["Head & Meta"] --> B["**Entities & Symbols**"]
    B --> C["Responsive HTML"]
    C --> D["Graphics (Canvas & SVG)"]
    D --> E["Media & APIs"]
    E --> F["HTML Master"]
    style B fill:#f97316,stroke:#c2410c,color:#fff
    style A fill:#e5e7eb,stroke:#9ca3af,color:#374151
    style F fill:#22c55e,stroke:#16a34a,color:#fff
  

What Are HTML Entities?

An HTML entity always starts with & and ends with ;. In between is a name or number that represents a character:

  • Named entity: &copy; → ©
  • Decimal entity: &#169; → ©
  • Hex entity: &#x00A9; → ©

Named entities are easiest to remember. Decimal works everywhere. Hex is for Unicode characters.


Reserved Characters (Must Be Escaped)

These characters have special meaning in HTML and must be written as entities:

CharacterEntityWhy it’s reserved
<&lt;Starts an HTML tag
>&gt;Ends an HTML tag
&&amp;Starts an entity
"&quot;Wraps attribute values
'&apos;Wraps attribute values (single quotes)
<p>Use &amp;lt; for less-than and &amp;gt; for greater-than.</p>
<!-- Output: Use &lt; for less-than and &gt; for greater-than. -->
Always use &amp; for ampersands in URLs — otherwise the browser misinterprets them as entity start. Instead of <a href="page.php?id=1&name=test">, write <a href="page.php?id=1&amp;name=test">.

Common Symbols

CharacterEntityDecimalUse Case
©&copy;&#169;Copyright notice
®&reg;&#174;Registered trademark
&trade;&#8482;Trademark
&euro;&#8364;Euro currency
£&pound;&#163;Pound sterling
¥&yen;&#165;Japanese yen
°&deg;&#176;Degrees (temperature, angle)
×&times;&#215;Multiplication sign
÷&divide;&#247;Division sign
&hearts;&#9829;Heart symbol
&bull;&#8226;Bullet point
&hellip;&#8230;Ellipsis
<p>&copy; 2026 DodaTech Tutorials. All rights reserved.</p>
<p>5 &times; 3 = 15 &nbsp;|&nbsp; 10 &divide; 2 = 5</p>
<p>Temperature: 98.6&deg;F &nbsp;|&nbsp; Angle: 45&deg;</p>

Non-Breaking Space (&nbsp;)

Normally, browsers collapse multiple spaces into one. &nbsp; (non-breaking space) creates a visible space that also prevents line breaks:

<p>Mr.&nbsp;Smith&nbsp;Jr. stays on one line — the browser won't split at the space.</p>
<p>This&nbsp;&nbsp;&nbsp;has&nbsp;&nbsp;&nbsp;extra spaces — visible and preserved.</p>

When to use &nbsp;:

  • Prevent “Mr.” and “Smith” from being split across lines
  • Keep a number and its unit together: 50&nbsp;km/h
  • Add multiple visible spaces (normally collapsed)
  • Indent text without CSS

Emojis

Emojis are Unicode characters. You can use them directly in HTML (if your file is saved as UTF-8) or with entity references:

<p>Direct: 😊 🚀 🌍 ❤️</p>
<p>Hex: &#x1F60A; &#x1F680; &#x1F30D; &#x2764;&#xFE0F;</p>
<p>Decimal: &#128522; &#128640; &#127757; &#10084;&#65039;</p>
Copy emojis directly into your HTML (👍). Modern editors and browsers handle UTF-8 encoding natively. No need to remember the entity codes.

Character Encoding

For entities and emojis to work, your page must declare UTF-8 encoding in the <head>:

<meta charset="UTF-8">

Without this, special characters may display as garbled text — like © instead of © or ☺ instead of .


Common Entity Mistakes

1. Forgetting the Semicolon

<!-- ❌ Wrong: no semicolon -->
&copy

<!-- ✅ Correct: semicolon required -->
&copy;

2. Using Text Instead of Entity for Reserved Characters

<!-- ❌ Wrong: browser thinks < is a tag -->
<p>Use < for less-than</p>

<!-- ✅ Correct: use entity -->
<p>Use &lt; for less-than</p>

3. Using Entities Inside <pre> or <code>

Even inside <pre> or <code>, reserved characters must be escaped. The browser first parses HTML, then applies <pre> formatting.

4. Forgetting &amp; in URLs with Query Parameters

<!-- ❌ Wrong: & might be misinterpreted -->
<a href="/search?q=html&page=2">Next</a>

<!-- ✅ Correct: use &amp; in URLs -->
<a href="/search?q=html&amp;page=2">Next</a>

5. Using Entities for Styling Instead of CSS

<!-- ❌ Wrong: using nbsp for indentation -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;Indented text</p>

<!-- ✅ Correct: use CSS for styling -->
<p style="margin-left: 40px;">Indented text</p>

Quick Reference

Reserved Characters (Always Escape)

&lt;    <    less-than
&gt;    >    greater-than
&amp;   &    ampersand
&quot; "    double quote
&apos; '    apostrophe

Common Symbols

&copy;     ©     copyright
&reg;      ®     registered trademark
&trade;    ™     trademark
&euro;     €     euro
&pound;    £     pound
&yen;      ¥     yen
&deg;      °     degree
&times;    ×     multiplication
&divide;   ÷     division
&bull;     •     bullet
&hellip;   …     ellipsis
&nbsp;     [space]   non-breaking space

Try It Yourself

Experiment with entities in this sandbox:

▶ Try It Yourself Edit the code and click Run

Common Mistakes Beginners Make

1. Skipping the Fundamentals

Many beginners jump straight to advanced topics without mastering the basics. Take time to understand the core concepts before moving on.

2. Not Practicing Enough

Reading tutorials without writing code leads to shallow understanding. Code along with every example and experiment on your own.

3. Ignoring Error Messages

Error messages tell you exactly what went wrong. Read them carefully — they usually point to the line and type of issue.

4. Copy-Pasting Without Understanding

It’s tempting to copy code from tutorials, but typing it yourself and understanding each line builds real skill.

5. Giving Up Too Early

Every developer hits frustrating bugs. Take breaks, ask for help, and remember that struggling is part of learning.

Practice Questions

Q1: What entity represents the copyright symbol?

&copy; which renders as ©.

Q2: Why can’t you type < directly in HTML?

Because the browser interprets < as the start of an HTML tag. Use &lt; to display it literally.

Q3: What does &nbsp; do?

It creates a non-breaking space — a visible space that also prevents the browser from breaking the line at that point.

Q4: What must you include for entities to work properly?

<meta charset="UTF-8"> in the <head>. Without it, special characters may show as garbled text.

Q5: What entity should you use for an ampersand in a URL?

&amp; — so page.php?id=1&amp;name=test instead of using & directly.

Challenge

Create a “Product Page” that includes:

  • A copyright footer using &copy;
  • Pricing with &euro; or &pound;
  • A code example showing HTML tags (using &lt; and &gt;)
  • A non-breaking space between a number and its unit
  • At least two emojis

Frequently Asked Questions

What's the difference between named, decimal, and hex entities?
Named (&copy;) is easiest to remember but not all characters have names. Decimal (&#169;) works everywhere. Hex (&#x00A9;) is for Unicode characters. All three produce the same result.
Can I use emojis directly or should I use entities?
Use emojis directly — they’re easier to read and type. Just make sure your HTML file is saved with UTF-8 encoding and has <meta charset="UTF-8">.
Do entities affect page load speed?
Negligibly. They’re replaced by the browser during HTML parsing and don’t add meaningful load time.

What’s Next?

Now let’s make pages look great on all devices:

What’s Next

Congratulations on completing this Html Entities tutorial! Here’s where to go from here:

  • Practice daily — Consistency is more important than long study sessions
  • Build a project — Apply what you learned by building something real
  • Explore related topics — Check out other tutorials in the same category
  • Join the community — Discuss with other learners and share your progress

Remember: every expert was once a beginner. Keep coding!

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro