The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →To display a literal ampersand (&) in HTML, write & in the source. The browser parses that character reference and renders &.
What are HTML ampersand codes?
They are character references: sequences in HTML source that begin with an ampersand and represent a character. “HTML entity” is a familiar synonym, although entity is older terminology. The WHATWG HTML Standard defines the syntax; MDN’s character-reference glossary gives a concise overview.
As an Amazon Associate I earn from qualifying purchases.
For example, a browser reads & as the ampersand character, Unicode U+0026. The source spelling and the character displayed on the page are different: the code contains the reference, while the rendered page shows the character it represents.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Which ampersand spelling should you use?
Use & for the readable, conventional spelling. These three forms all represent the same character:
#1 Best Overall
- HTML CSS Design and Build Web Sites
- Comes with secure packaging
- It can be a gift option
| Form | HTML source | Represents |
|---|---|---|
| Named | & |
& |
| Decimal numeric | & |
& (U+0026; decimal 38) |
| Hexadecimal numeric | & |
& (U+0026; hexadecimal 26) |
The named spelling is easiest to recognize. Numeric references can be useful when you know the character’s code point or need to represent a character without a familiar named form. For ordinary ampersands, there is little reason to prefer them over &.
Why does HTML use character references?
Some characters also have a role in HTML syntax. An unescaped less-than sign can begin a tag, for example, so a reference lets you show markup-like text without having the browser interpret it as markup. Common named references include:
Rank #2
<displays<.>displays>."displays a double quotation mark.'displays an apostrophe.&displays an ampersand.
To show the text <p> rather than create a paragraph element, write <p> in the HTML source. The browser displays the angle brackets and letter p as text.
Do you need a semicolon, and does capitalization matter?
For new HTML, use the semicolon-terminated spellings shown above: &, &, and &. Named references are case-sensitive, and the standard’s reference list includes some historical variants without semicolons. Those exceptions are not a good pattern to rely on in new code; consistent semicolon use is clearer.
Rank #3
HTML also defines an “ambiguous ampersand”: an ampersand followed by one or more ASCII letters or digits and a semicolon when the sequence does not match a named reference. In attribute values, such text must not be left as an ambiguous ampersand. Encoding a literal ampersand as & avoids confusion when it precedes text that could be read as a reference.
What if the page visibly shows “&”?
If the page displays the letters & instead of a single ampersand, the visible text may have been escaped more than once, or the page may be presenting the source spelling as text. Check the HTML source and the way the content is inserted: one character reference should be parsed to produce one ampersand.
Rank #4
- Brand: Wiley
- Set of 2 Volumes
- A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers
Do all symbols need HTML codes?
No. In a document served and interpreted as UTF-8, modern browsers can handle many non-ASCII characters directly; you do not need to replace every symbol with a character reference. References remain useful when a character overlaps with HTML syntax, when you want a named spelling for readability, or when you need to express a particular code point. See MDN’s guide to basic HTML syntax for further examples.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsQuick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




