What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
' and ' represent the same apostrophe character in HTML: U+0027. One is a decimal numeric character reference; the other is a named character reference. If an apostrophe appears in a name inside a single-quoted HTML attribute, the practical fix is usually to put the attribute value in double quotes.
What do ' and ' mean?
Both references represent U+0027, the ordinary apostrophe character. The difference is how the reference is written, not what character it represents:
| Reference | Type | Character |
|---|---|---|
' |
Decimal numeric character reference: the number after # is a decimal code point |
U+0027 apostrophe |
' |
Named character reference | U+0027 apostrophe |
The WHATWG HTML Standard’s named-character-reference table maps apos; to U+0027. Its character-reference syntax defines decimal numeric references as &# followed by decimal digits and a semicolon. In HTML, both forms are interpreted as the same character.
Why does the apostrophe break the example?
Consider this markup:
<meta content='ronpat's' name='keywords'/>
The value of content starts with a single quote. The apostrophe in ronpat's is also a single quote, so it closes the value early. The remaining characters no longer form the intended attribute value.
#1 Best Overall
- HTML CSS Design and Build Web Sites
- Comes with secure packaging
- It can be a gift option
How should you write an attribute containing an apostrophe?
Use double quotes around the value
This is the simplest, clearest fix:
<meta content="ronpat's" name="keywords">
The apostrophe inside the value does not conflict with the double-quote delimiters. For ordinary HTML markup, double quotes are a common convention; the SitePoint discussion that raised this example recommended them as well, while noting that single quotes can appear inside a double-quoted value. The SitePoint thread dates from July 6, 2016.
Use a character reference when appropriate
You can also represent the apostrophe with a character reference inside the intended attribute value. For example, ' or ' represents that same apostrophe. The reference does not change the need to delimit the attribute correctly: choose quotes that let the parser identify the full value.
Rank #2
Why might one form be converted to the other?
A program that generates or rewrites HTML can choose to serialize an apostrophe as a numeric reference or as a named reference. Both notations represent the same character, so the choice may reflect that program’s output conventions rather than a difference in the text or its rendered meaning.
The SitePoint question mentions Blogger as a possibility, but the discussion does not establish which software performed the conversion or what settings it used. Without a reproducible example from that environment, the specific cause cannot be determined. The important distinction is that HTML parsing interprets the references, while the generating software chooses how to write the character in the markup.
Quick Recap
Best Value
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
Rank #3
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.




