Display HTML snippets in HTML

The tried and true method for HTML:

  1. Replace the & character with &
  2. Replace the < character with &lt;
  3. Replace the > character with &gt;
  4. Optionally surround your HTML sample with <pre> and/or <code> tags.

Leave a Comment