Encoding encoding html web

What is HTML Entities?

Definition

HTML entities are special sequences that represent reserved or special characters in HTML. They start with & and end with ; — for example, &amp;lt; for <, &amp;amp; for &, and &amp;nbsp; for a non-breaking space.

Why It Matters

HTML entities prevent browsers from misinterpreting special characters as markup. Displaying user-generated content without proper entity encoding can lead to broken layouts or XSS (cross-site scripting) vulnerabilities. Every web application must encode output correctly.

Code Example

&lt;p&gt;Price: $5 &amp;amp; up&lt;/p&gt;
<!-- Renders as: Price: $5 & up -->

Language: html

Related Free Tools

Related Terms