Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 1026296 of Entity

  • Revision slug: Glossary/Entity
  • Revision title: Entity
  • Revision id: 1026296
  • Created:
  • Creator: rolfedh
  • Is current revision? No
  • Comment Editorial review. No edits.

Revision Content

An {{glossary("HTML")}} entity is a string that begins with '&' and ends with ';'. Entities can be used to represent any character in HTML.

However, HTML reserves the following four characters. Browsers interpret these characters instead of rendering them in the output. To display these characters in your content, use the entity.

Character Entity Note
& & Character indicates the beginning of an entity.
< &lt; Character indicates the beginning of a {{Glossary('tag')}}
> &gt; Character indicates the ending of a {{Glossary('tag')}}
" &quote; Character indicates the beginning and end of an {{Glossary('attribute')}} value.

Learn more

Technical reference

Revision Source

<p>An {{glossary("HTML")}} <strong>entity</strong> is a string that begins with '<code>&amp;'&nbsp;</code>and ends with '<code>;'</code>. Entities can be used to represent any character in HTML.</p>

<p>However, HTML reserves the following four characters. Browsers interpret these characters instead of rendering them in the output. To display these characters in your content, use the entity.</p>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Character</th>
   <th scope="col">Entity</th>
   <th scope="col">Note</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>&amp;</td>
   <td><code>&amp;amp;</code></td>
   <td>Character indicates the beginning of an entity.</td>
  </tr>
  <tr>
   <td>&lt;</td>
   <td><code>&amp;lt;</code></td>
   <td>Character indicates the beginning of a {{Glossary('tag')}}</td>
  </tr>
  <tr>
   <td>&gt;</td>
   <td>&amp;gt;</td>
   <td>Character indicates the ending of a {{Glossary('tag')}}</td>
  </tr>
  <tr>
   <td>"</td>
   <td>&amp;quote;</td>
   <td>Character indicates the beginning and end of an {{Glossary('attribute')}} value.</td>
  </tr>
 </tbody>
</table>

<h2 id="Learn_more">Learn more</h2>

<h3 id="Technical_reference">Technical reference</h3>

<ul>
 <li><a href="https://dev.w3.org/html5/html-author/charref">Official list of character identifiers</a></li>
</ul>
Revert to this revision