HTML/CSS Lesson 10 – HTML Symbols

Last updated on December 17th, 2023

What is an HTML symbol?

HTML contains a rich library of symbols that can be written in the HTML code by their names or by numbers. Symbols in HTML are also called “entities”.

The syntax for writing a symbol with a name is: &entity_name;
(ampersand – name – semicolon).

The syntax for writing a character with numbers is: &#entity_number;
(ampersand – number sign – number – semicolon)

For example, one of the most used symbols is the Copyright symbol, which is the letter c enclosed in a circle: ©.

The letter code of the Copyright symbol is ©
The numeric code of the Copyright symbol is ©

I.e. for the copyright symbol to appear on your page, you need to write the following code:

<!DOCTYPE html>
<html>
<head>
<title> Test </title>
</head>
<body>

&#169; Copyright

</body>
</html>

List of commonly used HTML symbols

© – Copyright Symbol

Entity Name: &copy;
Entity Number: &#169;

® – Registered Trademark Symbol

Entity Name: &reg;
Entity Number: &#174;

™ – Trademark Symbol

Entity Name: &trade;
Entity Number: &#8482;

§ – Section Sign Symbol

Entity Name: &sect;
Entity Number: &#167;

Non-Breaking Empty Space

Entity Name: &nbsp;
Entity Number: &#160;

What is the Non-Breaking Space in HTML?

In situations where you want to keep two words or characters together and prevent them from being separated by a line break, you can use &nbsp; (or &#160). This is particularly useful for items that should stay on the same line, such as names, like this: John&nbsp;Doe. You can also use it if you just need to leave a blank space in front of an element or between two elements.

More examples of HTML symbols

♠ – &#9824; – Spade

♣ – &#9827; – Club

♥ – &#9829; – Heart

♦ – &#9830; – Diamond

☎ – &#9742; – Phone

☀ – &#9728; – Sun

☑ – &#9745; – Checkbox

☛ – &#9755; – Right Pointing

☠ – &#9760; – Skull and Crossbones

☯ – &#9775; – Yin Yang

♿ – &#9855; – Wheelchair

⚽ – &#9917; – Soccer Ball

✈ – &#9992; – Airplane

∞ – &#8734; – Infinity

☕ – &#9749; – Hot beverage

💰 – &#128176; – Money bag

🌻 – &#127803; – Sunflower

😜 – &#128540; – Face with Stuck-Out Tongue and Winking Eye