Home   |   About   |   Terms   |   Contact    
A platform for writers

How to display HTML codes On WebPage?

Web Design & Development

☯ All Web Related Articles     ☯ All Articles

Popular Google Pages:

◕ Send your story to RiyaButu.com and get ₹ 500/- Details..

◕ Bengali Story writing competition. Details..

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;

< 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.

// My html code here....

■ 3)
We can use
// My html codes ..

■ 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.

Top of the page

Amazon & Flipkart Special Products


Top of the page