HTML Chapter Entities
Character Entities
Nonbreaking Space
Commonly used Character Entites
Character Entities
Some characters are reserved in HTML.
A character entity looks like this: &entity_name; or &#entity_number;
To display a less than sign, you must write: < ot <
advantage: using an entity name instead of a number is that te name often is esier to remember.
disadvantage: browsers may not support all entity names (while the support of entity numbers is very good)
<html>
<body>
<h1>character entities</h1>
<p>Code: &x;</p>
<p> substitute the x with a n entity number like "#174" or an entity name like "pound" to see the result. use the table in the next section to try different character entities.
</p>
</body>
</html>
Nonbreaking Space
To add lots of spaces to your text, use the character entity.
Commonly used character entities
Description Entity name Entity number
nonbreaking space  
less than < <
greater than > >
ampersand & &
cent ¢ ¢
pound £ £
yen ¥ ¥
euro € €
section § §
copyright © ©
rigistered trademark ® ®
Character Entities
Nonbreaking Space
Commonly used Character Entites
Character Entities
Some characters are reserved in HTML.
A character entity looks like this: &entity_name; or &#entity_number;
To display a less than sign, you must write: < ot <
advantage: using an entity name instead of a number is that te name often is esier to remember.
disadvantage: browsers may not support all entity names (while the support of entity numbers is very good)
<html>
<body>
<h1>character entities</h1>
<p>Code: &x;</p>
<p> substitute the x with a n entity number like "#174" or an entity name like "pound" to see the result. use the table in the next section to try different character entities.
</p>
</body>
</html>
Nonbreaking Space
To add lots of spaces to your text, use the character entity.
Commonly used character entities
Description Entity name Entity number
nonbreaking space  
less than < <
greater than > >
ampersand & &
cent ¢ ¢
pound £ £
yen ¥ ¥
euro € €
section § §
copyright © ©
rigistered trademark ® ®
No comments:
Post a Comment