WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML Entities


In this part we find out about HTML Entities.

When Characters are absent in catchphrase can be supplanted by elements.


HTML Entities

Some characters are held in HTML.

If you utilize the not exactly (<) or more prominent than (>) signs in your content, the program may blend them with tags.

Character substances are utilized to show saved characters in HTML.

A character element looks like this:

&entity_name;

OR

&#entity_number;

To show a not exactly sign we should compose: &lt; or on the other hand &#60;


Non-breaking Space

A normal character substance utilized in HTML is the non-breaking space: &nbsp;

A non-breaking space is a space that won't break into another line.

Two words isolated by a non-breaking space will stick together toward the finish of a line. This is helpful when breaking the words may be disruptive.

Examples:

  • � 10
  • 10 m/s
  • 10 km/h
  • 10 PM

Another normal utilization of the non-breaking space is to keep that programs truncate spaces in HTML pages.

If you compose 10 spaces in your content, the program will expel 9 of them. To add genuine spaces to your content, you can utilize the &nbsp; character entity.


Some Other Useful 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;
¢ cent &cent; &#162;
£ pound &pound; &#163;
¥ yen &yen; &#165;
euro &euro; &#8364;
© copyright &copy; &#169;
® registered trademark &reg; &#174;


Combining Diacritical Marks

A diacritical imprint is a "glyph" added to a letter.

Some diacritical imprints, similar to grave (  ̀) and intense (  ́) are called accents.

Diacritical imprints can seem both above and beneath a letter, inside a letter, also, between two letters.

Diacritical imprints can be utilized in mix with alphanumeric characters, to deliver a character that is absent in the character set (encoding) utilized in the page.

Here are some examples:

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;