- Practical Web Development
- Paul Wellens
- 155字
- 2021-07-16 13:14:08
HTML entities
As we know, all tags begin with a <
sign and end with a >
sign. Just imagine you want to use one of those as part of your content. This just might confuse the browser. That is why we have HTML entities.
HTML entities are strings that begin with an ampersand and end with a semicolon.
- This represents the ampersand itself:
&
- A very useful HTML entity is the non-breaking space:
It allows you to insert one or more spaces in you content. To use the
<
or>
sign in your content, we have:<
and>
- Also very useful are
&eur;
, for the Euro symbol,©
for the copyright sign, and®
for the Registered Trademark sign. - Non-English characters can be represented as HTML entities as well, for example,
é
for é,è
for è, andê
for ê.
We recommend you look up some of the online references if you want to see a complete list.