2.19 Character References

A character reference is code that you can use in your HTML to display a character that would otherwise be difficult to display. Character references are sometimes called “character entities.” We use the term “character reference” because that’s the term that the W3C uses. See the table in FIGURE 2.13. It contains some of the more popular character references.

FIGURE 2.13 Character references

Character

Character Reference

Description

<

&lt;

less than

>

&gt;

greater than

&le;

less than or equal

½

&frac12;

one-half

¼

&frac14;

one-fourth

&

&

ampersand

"

"

quote

'

'

apostrophe

space

&nbsp;

nonbreaking space

&leftarrow;

&larr;left arrow

&centerdot;

bullet

&check;

check mark ...

Get Web Programming with HTML5, CSS, and JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.