Apostrophe HTML Entity

'

Copy and Code Reference

An apostrophe must be encoded inside a single-quoted HTML attribute value when it belongs to the value rather than ending the attribute.

HTML Codes

Named entity'
Decimal reference'
Hexadecimal reference'
UnicodeU+0027

When to Use It

Both ' and ' represent the straight apostrophe in HTML5. The decimal form is common in older web examples.

Keep the final semicolon in every character reference. Modern UTF-8 documents can also contain the literal character when it is not part of HTML syntax.