Ampersand &
The ampersand is one of five predefined XML entities and among the most critical HTML entities. It must be escaped in HTML because the ampersand character signals the start of an entity reference. Failing to escape ampersands in URLs, query strings, and text content is one of the most common HTML validation errors.
All Representations
&&&U+0026Rendered Output
& renders as the character shown above
When to Use Ampersand
Use the ampersand entity whenever you need to display a literal & character in HTML content. This is especially important inside href attributes containing query parameters, in text that includes company names with ampersands, and anywhere an unescaped & could be misinterpreted as the beginning of a character reference.
Try It — HTML Examples
<p>Symbol: &</p><p>Symbol: &</p><p>Symbol: &</p><div title="The Ampersand: &">Hover to see</div>About the Ampersand Entity
The Ampersand character (&) is a standard HTML entity defined in the HTML specification. In HTML source code, it can be written using the named entity reference &, the decimal numeric character reference &, or the hexadecimal numeric reference &. The character is assigned Unicode code point U+0026 in the Universal Character Set.
The ampersand is one of five predefined XML entities and among the most critical HTML entities. It must be escaped in HTML because the ampersand character signals the start of an entity reference. Failing to escape ampersands in URLs, query strings, and text content is one of the most common HTML validation errors.
Punctuation and whitespace entities are among the most frequently used HTML entities in web development. They handle characters that either have special meaning in HTML syntax — such as angle brackets and ampersands — or represent typographic characters that improve the visual quality of text, like em dashes and curly quotes. Proper use of punctuation entities is essential for producing valid, well-formed HTML documents and achieving professional-looking typography on the web.
When deciding how to encode the Ampersand character in your HTML documents, the named entity & is generally the most readable choice for developers reviewing or maintaining source code. The decimal form & and hexadecimal form & are equally valid alternatives that work in contexts where named entities may not be supported, or when generating HTML output programmatically from server-side code. All three representations produce identical visual output in every modern web browser.
Use the ampersand entity whenever you need to display a literal & character in HTML content. This is especially important inside href attributes containing query parameters, in text that includes company names with ampersands, and anywhere an unescaped & could be misinterpreted as the beginning of a character reference.
Related Entities
Explore More HTML Entities
Browse our complete reference of 262 HTML entities with codes, examples, and usage tips.