-2

I would like to showcase an HTML entity and the way its written in code next to it. I just cant find a way to write & without it turning to @ in my page. What should go with it so it is shown as plain text ?

j08691
  • 204,283
  • 31
  • 260
  • 272
  • 1
    `&` is `&` not `@` – j08691 Mar 11 '22 at 16:10
  • Does this answer your question? [How to write out HTML entity name ( , <, >, etc)](https://stackoverflow.com/questions/17427713/how-to-write-out-html-entity-name-nbsp-lt-gt-etc) – Progman Mar 12 '22 at 14:27

2 Answers2

1

Use the <xmp> tag as stated below:

<xmp>
here comes your preformatted and escaped &lt;html&gt;-code
</xmp>

here comes your preformatted and escaped &lt;html&gt;-code

More information about xmp

Nemoko
  • 421
  • 4
  • 13
  • 2
    Per the page you linked to for ``: _**Deprecated: This feature is no longer recommended**. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time._ – j08691 Mar 11 '22 at 16:12
0

I found it I meant &lt; so I can show case the way you code it and the symbol itself

&amp;lt 
&lt;