HTML/CSSBeginner#html#entities

What is the difference between HTML entities and Unicode characters?

HTML entities like &amp; or &copy; are text codes representing reserved or special characters that would otherwise break HTML parsing or aren't easy to type. Modern documents with UTF-8 charset can often use the raw Unicode character directly, but entities remain safer for reserved characters like < and &.

Example
<p>5 &lt; 10 &amp; 10 &gt; 5</p>
<p>&copy; 2024 MyCompany</p>

Related Questions

1
HTML/CSSBeginner#html#attributes

What is the difference between the id and class attributes?

Open
2
HTML/CSSAdvanced#html#javascript

What is the <template> element used for?

Open
3
HTML/CSSAdvanced#html#security

What is the difference between the <iframe> sandbox attribute values?

Open