Saturday, July 4, 2009

How to display html tags on a webpage?

Initially when i trying to blog inputs with html tags, i found myself swimming in troubled waters. Was not able to get even a simple tag on the blog page. Though editor boxes in blogs displayed the < & > tags, they were not visible when published.

Well the reason is quite justifiable. Had the text editor (can be anything notepad, wordpad or normal blog text editors etc..) allowed you to see this tag, then there would not have been an output for your site. All you would see would be your html tags and not the site you designed with the html tags.

Under normal scenarios, you generally don't need to display any html tags. However, if you wanna write some comments or solution to some html problems in blogs or forums, you need to take good care of it. The solution is simple, but the process is lengthy.

Solution: Use ASCII equivalent of html symbols.

Say for typing "<" you need to enter the ASCII equivalent of it: &#60;

To type <center>, all you need to do is to type &#60;center&#62; in the text editor.

You might be wondering how i typed the above text. The answer is quite simple.
I typed "& amp;#60;center& amp;#62;"(without any space) for the second center tag.

Look below for the ASCII equivalent values of the html tags:


No comments:

Post a Comment


Copyright © 2009 Aackose Mentu Lal
Best Viewed in 1024 x 768 Resolution