Languages
[Edit]
EN

HTML - entities

0 points
Created by:
Inayah-Alexander
767

In this article, we would like to show you how to create and use HTML Entities.

Quick solution:

&entity_name;

or:

&#entity_number;

 

Commonly used HTML Entities

CharacterDescriptionEntity nameEntity number
 non-breaking space  
<less than&lt;&#60;
>greater than&gt;&#62;
&ampersand&amp;&#38;
"quotation mark&quot;&#34;
'apostrophe&apos;&#39;

 

Practical example

In this example, we present commonly used HTML Entities.

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<body>
  <div>non-breaking space: "&nbsp;" or "&#160;"</div>
  <div>greater than:        &gt;    or &#62;</div>
  <div>less than:           &lt;    or &#60;</div>
  <div>ampersand:           &amp;   or &#38;</div>
  <div>quotation mark:      &quot;  or &#34;</div>
  <div>apostrophe:          &apos;  or &#39;</div>
</body>
</html>

Output:

non-breaking space: " " or " "
greater than: > or >
less than: < or <
ampersand: & or &
quotation mark: " or "
apostrophe: ' or '

References

  1. Entity - MDN Web Docs Glossary: Definitions of Web-related terms | MDN

Alternative titles

  1. HTML - character entities
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join