Escaping Escape Characters

Escaping Escape Characters
0

Hello all!

For my Technical Documentation Page project I’m working on breaking down the basics of HTML and CSS to help myself get a better understanding of how everything works. One problem I’m running into and can’t find a workaround for is how to type the code for escape characters in my HTML without it showing on the web page as an escape character.

For example, I’ll explain that the less-than sign may not appear if used in HTML code, and can therefore be replaced with “& l t ;” or “& # 6 0 ;”. However, when I type “& l t ;” in my code it simply shows the “<” symbol on the web page. Any help would be great!

Thanks!

Can you post a link to your code?

I think it is often done like this:

Example from here

<p>To display a less than sign (&lt;) we must write: <b>&amp;lt;</b> or <b>&amp;#60;</b></p>

One way to figure this out is to go to a page that has a list of HTML entities, right-click an entity, then in the Elements tab right-click the node and copy (copy element), then paste it into a text file or your HTML source file, you can now see the formatting used.

That works! Man, that’s a lot of work haha. I tried looking at other people’s code but wasn’t seeing that or something. Thank you very much.