Concept to display HTML code on the website.

The HTML code is started from a tag that is ‘<‘ (less than )  and closed with  ‘>’  greater than.
Let’s come to the point, you need to convert.

‘<‘  to &lt;     (we write less than tag (<) as &lt; )
‘>’ to &gt;  (we write greater than tag (>) as &gt; )

how to display html code on website
  1. <pre>
  2. &lt;div class=”html”&gt;
  3. &lt;html&gt;
  4. &lt;head&gt;&lt;title&gt;Title&lt;/title&gt;&lt;/head&gt;
  5. &lt;body&gt;
  6. &lt;p&gt;Unrendred html&lt;/p&gt;
  7. &lt;/body&gt;
  8. &lt;/html&gt;
  9. &lt;/div&gt;
  10. </pre>

Note:- If you have problem to generate custom html code. Please use display html code on the webpage generator. Link given below.

Leave a Reply