Posts

Showing posts with the label display HTML code on the website;

How to display html code on website.

Image
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; ) <pre> &lt;div class="html"&gt; &lt;html&gt; &lt;head&gt;&lt;title&gt;Title&lt;/title&gt;&lt;/head&gt; &lt;body&gt; &lt;p&gt;Unrendred html&lt;/p&gt; &lt;/body&gt; &lt;/html&gt; &lt;/div&gt; </pre> simply copy above snippet and paste in html page