Home   |   About   |   Terms   |   Contact    
Read & Learn
 

How to display HTML codes On WebPage?

Web Design & Development

☯ All Web Related Articles     ☯ All Articles


A new product.






Popular Google Pages:




This article is regarding How to display HTML codes On WebPage?
Last updated on: .



◕ For tutorials or other purpose sometimes we need to show or display html code in a web page. The following are some process by which we can display html code in html.



■ 1)
If you want to display or show HTML code on a web page so that it is not executed, you need to convert the ' < ' and ' > ' into it's ascii equivalent of
'<'   as   &lt; and
' >'   as   &gt;

Example:
< p > // My html code here..... < /p >

We will write it as
&lt; p &gt;
// My html code here.....
&lt; /p &gt;




■ 2)
We can use <pre> and </pre> tags.

Example:
<pre>
// My html code here....
</pre>




■ 3)
We can use
<xmp>
// My html codes ..
</xmp>




■ 4)
In PHP you can use the following code:
echo htmlspecialchars( ' My html code here ' );



◕ Related articles:
► Difference between .html & .htm
► List of wildcard used in MySQL
► MySQL match a string
► Eliminate render blocking CSS
► Eliminate Render Blolcking JavaScript or jQuery
► How google will trust a site?
► What is browser cache? How to leverage browser caching of your website? Browser Caching with .htaccess
► URL Redirection with .htaccess
► Ask Google to re-crawl your URL.





Popular Google Pages:





Top of the page

Amazon & Flipkart Special Products

   


Top of the page