TheDeveloperBlog.com

Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

HTML Entities

HTML Entities or HTML 5 Tutorial for beginners and professionals with tags, elements, tables, forms, anchor, image, heading, marquee, textarea, div, audio, video, header, footer etc.

<< Back to HTML

HTML Entities

HTML character entities are used as a replacement of reserved characters in HTML. You can also replace characters that are not present on your keyboard by entities.

These characters are replaced because some characters are reserved in HTML. HTML entities provide a wide range of characters which can allow you to add icons, geometric shapes, mathematical operators, etc.

For example: if you use less than (<) or greater than (>) symbols in your text, the browser can mix them with tags that's why character entities are used in HTML to display reserved characters.

How to use an entity:

You can use an entity in your HTML document by name or by a numerical character reference. Each entity starts with symbol ampersand (&) and ends with a semicolon (;).

Syntax:

&entity_name;
  OR
&#entity_number;

Most used HTML Character Entities

Result Description Entity Name Entity Number
  non-breaking space &nbsp; 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

Note:Entity names are case sensitive.

Advantage of entity name: An entity name is easy to remember.

Disadvantage of entity name: Browsers may not support all entity names, but the support for numbers is good.

Example:

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
 <body>
    <h3>HTML entity example</h3>
    <p> "This is the content written within entity"</p>
    <p> 

Paragraph tag </p> </body> </html>

Test it Now

Diacritical Marks in HTML

There are some special types of letters used in HTML whichhave some glyph added to the top or below the letters. These glyphs are called diacritical mark.

Some diacritical marks, like grave (   ̀) and acute (   ́) are called accents.Diacritical marks can be used both above and below a letter, inside a letter, and between two letters.

Following is a list of some 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;

Next TopicHTML Symbols




Related Links:


Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf