HTML Entities

HTML Entities are special codes that represent characters in HTML that would otherwise be interpreted as part of the code, like < and >. Entities ensure that these characters are displyed correcctly on the webpage.

Tutorials dojo strip

HTML Entities Syntax

Explanation of Syntax:

  • Each entity begins with an ampersand (&) and ends with a semicolon (;).
  • Between & and ;, the entity name or number represents a specific character.
HTML




HTML Entities Example Code

Explanation of Code:

  • The <!DOCTYPE html> declaration and <html>, <head>, and <body> tags set up the page structure.
  • The <p> tags in the <body> section contain sentences demonstrating HTML entities:
    • &amp; represents the ampersand (&) character.
    • &lt; and &gt; represent the less-than (<) and greater-than (>) characters.
    • &quot; represents the quotation mark (") character.
    • &apos; represents the apostrophe (') character.
HTML




HTML Labs

Tutorials dojo strip