October 29, 2019
Issues we've come across, and how we fixed them.
How Do You Display HTML Tags?

To display HTML tags in a website, use their HTML encoding translation.

  • Replace the < character with &lt;
  • Replace the > character with &gt;
  • Replace the & character with &amp;

You don't actually have to encode the ">" character. That one will show as long as you encode the "<" character. So, you can write &lt;div> without encoding the > as &gt; and it will show like <div> when you write it. The & character you may have to escape in order to show the encoding of other characters. We did this in order to correctly display the information above.

We came across this issue when we were writing another post dealing with the list-style attribute and working with <ol>, <ul>, and <li>. How do we actually show this on the website itself? We have to encode it. So we looked up the html encoding translations and found this answer.

We'll be sure to add to this list should we come across different encodings that we need to use for this purpose.

 Profile Picture
Comment

Proudly Serves

Allentown, Bethlehem, Lehigh Valley... and everywhere else!

Follow Our Socials