+ 1
html code inside a html paragraph<p>
how can i write write a html code to view in browsers inside the <p> tag?
1 Answer
+ 1
You must encode certain characters such as <> for obvious reasons.
To do this, use both < (lesser than) and > (greater than) respectively for proper encoding, and optionally surround your text with <pre> and <code> tags.
Example:
<p>This is a body tag:<br><br>
<body></p>
Output:
This is a body tag:
<body>
Reference tables are available if you look them up.
Bonus: ampersand (&) itself is &
Don't forget the semicolon!
ATTENTION: this must be viewed from the mobile app, as the web version automatically parses any encoding.