I want the output in my window to show the actual "<!-- -->"
. How do I quote that so it prints out?
Same for printing out <h2>Text Here</h2>
- I want it to actually print that out, and not do the <h2>
style.
<
is <
>
is >
Have a look at this code snippet:
This will appear as a comment:
<br><!-- Test -->
<br>
<br>This will actually appear:
<br><!-- Test -->
You can find out how to escape characters here: https://ascii.cl/htmlcodes.htm
xmp
tagWarning: this feature is discouraged by MDN webdocs:
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/xmp
This will appear as a comment:
<br><!-- Test -->
<br>
<br>This will actually appear:
<br><xmp><!-- Test --></xmp>