How to show html code on the website? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

How to show html code on the website?

14th Jul 2021, 5:59 AM
Md Sahid Sk
Md Sahid Sk - avatar
7 Answers
+ 3
The <xmp> HTML element renders text between the start and end tags without interpreting the HTML in between and using a monospaced font. The HTML2 specification recommended that it should be rendered wide enough to allow 80 characters per line. I don't recommend this beacuse It has been deprecated since HTML3.2 and was not implemented in a consistent way. It was completely removed from the language in HTML5. Use the <pre> element or, if semantically adequate, the <code> element instead. that you will need to escape the '<' character as '&lt;' to make sure it is not interpreted as markup. https://code.sololearn.com/WMAyrf6BMf13/?ref=app
14th Jul 2021, 6:55 AM
Matias
Matias - avatar
+ 1
<code>...</code>
14th Jul 2021, 6:35 AM
Sudo
Sudo - avatar
+ 1
Not working on html .. all code runs on browser .
14th Jul 2021, 6:36 AM
Md Sahid Sk
Md Sahid Sk - avatar
+ 1
Thanks 😘
14th Jul 2021, 6:58 AM
Md Sahid Sk
Md Sahid Sk - avatar
+ 1
Dear Md Sahid Sk please mark it as solved
15th Jul 2021, 5:21 AM
Anurag Saikia
0
I know that bro.. i want to show html code in webpage like paragraph...
14th Jul 2021, 6:13 AM
Md Sahid Sk
Md Sahid Sk - avatar
0
I know that bro.. i want to show html code in webpage like paragraph...
14th Jul 2021, 6:15 AM
Md Sahid Sk
Md Sahid Sk - avatar