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

ResultDescriptionEntity NameEntity 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:

MarkCharacterConstructResult
 ̀aa&#768;
 ́aa&#769;
̂aa&#770;
 ̃aa&#771;
 ̀OO&#768;
 ́OO&#769;
̂OO&#770;
 ̃OO&#771;
Related Article
Introduction to HTML

HTML Introduction – Learn the Basics of HTML HTML is the starting point of web development. Every website you see Read more

What is HTML

What Is HTML – Complete Beginner Explanation HTML is the foundation of the web. Every website you visit, from simple Read more

HTML Basic Examples

HTML Basic Examples – Learn HTML by Practice The best way to learn HTML is by writing and testing simple Read more

HTML text Editors

HTML Text Editors – Learn How to Write HTML Code To write HTML code, you need a text editor. A Read more

HTML Tags

HTML Tags are the basic units used to create HTML elements.They define how content is displayed in a web browser. Read more

HTML Elements

HTML Elements are the building blocks of every web page.Each element defines a part of the webpage, such as headings, Read more

HTML Attributes

HTML Attributes provide additional information about HTML elements.They help control how elements behave, display, or store extra data. In this Read more

HTML Headings

HTML Headings are used to define titles and subtitles on a web page.They help organize content and improve readability for Read more