HTML Entities

HTML character entities are used to replace characters that aren\’t allowed to be used. You can also use entities to stand in for characters that you don\’t have on your keyboard.

Some of these characters are changed because HTML doesn\’t let you use all characters. HTML entities give you access to a wide range of characters that you can use to add icons, geometric shapes, mathematical operators, and other things.

For example, if you use the less than () or greater than (>) symbols in your text, the browser might mix them up with tags. This is why character entities are used in HTML to show reserved characters.

How to use an entity:

You can use an entity in an HTML document either by its name or by its number. Each thing begins with the symbol \”&\” and ends with a \”;\” (;).

Syntax:

 &entity_name;
OR
&#entity_num;

 

Entities for HTML Characters Most Often Used

Result Description Entity Name Entity Number
non-breaking space   160
< less than &lt; 60
> greater than &gt; 62
& ampersand &amp; 38
\” double quotation mark &quot; 34
\’ single quotation mark (apostrophe) &apos; 39
¢ cent &cent; 162
£ pound &pound; 163
¥ yen &yen; 165
Euro &euro; 8364
© copyright &copy; 169
® registered trademark &reg; 174

Entity names are case sensitive.

A good thing about an entity name is that it\’s easy to remember.

Entity names may not be supported by all browsers, but browsers do a good job of supporting numbers.

 

Diacritical Marks in HTML

In HTML, there are some special kinds of letters that have glyphs added to the top or bottom. The name for these symbols is diacritical mark.

Accents are some of the diacritical marks, like grave ( ̀) and acute ( ̀).

You can put diacritical marks above or below a letter, inside a letter, or between two letters.

Here are some examples of diacritical marks:

Mark Character Construct Result
 ̀ a a&#768;
 ́ a a&#769;
̂ a a&#770;
 ̃ a a&#771;
 ̀ O O&#768;
 ́ O O&#769;
̂ O O&#770;
 ̃ O O&#771;
Related Posts
Introduction to HTML

HTML Introduction HTML is the most common language used to mark up Web pages. What does HTML mean? Hyper Text Read more

What is HTML

HTML stands for Hyper Text Markup Language, which is a programming language used to make web pages and web apps. Read more

HTML Basic Examples

In this chapter, we\'ll show you some simple examples of HTML code. Don\'t worry if we use tags that you Read more

HTML text Editors

Editors for HTML text HTML files are text files, so any text editor can be used to make them. Text Read more

HTML Tags

Learn HTML Tags HTML tags are kind of like keywords that tell a web browser how to format and show Read more

HTML Elements

Elements make up an HTML file. These elements are what make web pages and tell you what content is on Read more

HTML Attributes

Attribute in HTML Attributes in HTML are special words that tell you more about an element. Attributes change the way Read more

HTML Headings

Headings in HTML The <h1> to <h6> tags are used to set up headings in HTML. <h1> shows which heading Read more

Scroll to Top