+ 3

How to display code in code

So I created a h1 tag and created another h1 tag in it. But it doesn't display it. I want to display an example code in output. Can I plz have the most simple code example about that? Thanks

7th Apr 2021, 11:47 PM
Michael
Michael - avatar
1 Respuesta
+ 3
You can do this by replacing < with &lt and > with &gt So if you wanted to put h1 in a h1 tag just put <h1>&lth1&gt&lt/h1&gt</h1>
8th Apr 2021, 12:53 AM
Pieter Edwards
Pieter Edwards - avatar