SYP Start Your Path

Entities, Symbols, Emojis & Charsets

HTML Entities

Some characters have special meaning in HTML (like < and >, which define tags) โ€” to actually display them on the page, you need an entity instead of typing them directly.

&lt;   โ†’  <
&gt;   โ†’  >
&amp;  โ†’  &
&quot; โ†’  "
&nbsp; โ†’  (a non-breaking space)

Writing <div> directly inside a paragraph would be read as an actual tag by the browser โ€” you'd need &lt;div&gt; to show it as visible text. In PHP, htmlspecialchars() (used throughout this site) does this conversion automatically and safely for any dynamic text.

Symbols

Many useful symbols also have their own entity codes:

&copy;   โ†’  ยฉ
&reg;    โ†’  ยฎ
&trade;  โ†’  โ„ข
&euro;   โ†’  โ‚ฌ
&pound;  โ†’  ยฃ
&deg;    โ†’  ยฐ
&times;  โ†’  ร—
&divide; โ†’  รท

You can also use a numeric code (e.g. &#169; for ยฉ) โ€” named entities are usually easier to remember and read in source code.

Emojis

Emojis are just Unicode characters, like letters โ€” as long as your page declares UTF-8 encoding (see Charsets below), you can paste them directly into your HTML and they'll display correctly:

<p>Payment successful! โœ… ๐ŸŽ‰</p>

This site's own certificate and payment pages use emojis directly this way โ€” no special encoding needed once UTF-8 is set.

Character Sets (Charset)

A character set tells the browser how to interpret the bytes of your HTML file into actual characters. UTF-8 is the modern standard โ€” it supports virtually every language and symbol (including emojis) in the world.

<head>
  <meta charset="UTF-8">
</head>

Without this line (or with the wrong charset), special characters, non-English text, and emojis can show up as broken/garbled symbols. Always put this as the very first line inside <head>.