Search This Blog

Tuesday, August 21, 2007

Ways to display HTML tags in posts and comments

NOTE: All the below instructions are for posting comments or for preparing posts in the EDIT HTML mode, not the COMPOSE mode.


There are some bloggers who may want to post HTML tags in comments or posts but don't know how. If you try to type the HTML tag to display an image, for example:

<img src="photo URL">

exactly as you see it above in the comment or post, you will just get an empty box. I have to use an image to show the codes I used to display the above HTML tag:



The "less than" < have to be replaced by special code to display HTML character and the "great than" > have to be replaced by special code to display greater than


UPDATE 27 August 2008: The image HTML tag below is an illustration of, for example, if you want to show a blog reader what to type in order to display an image. It cannot be used to display an image in the comments


If you have a large block of HTML code to display, an easy way is to type or copy-paste them into Notepad, then click EDIT > REPLACE.... in the menu bar, and type in the appropriate characters. For example, if I want to display the HTML for the images above, I will highlight the HTML, press ctrl+C or right-click and chose "copy" to copy the HTML into clipboard, open a Notepad file, paste the HTML into Notepad, click EDIT > REPLACE... in the menu bar and.... (best illustrated by the screenshot below - click to enlarge):

use Notepad to replace special HTML tags with special code to display them on the web

Click "Replace all" and all the < will be replaced by special code to display less than . You can repeat the process for >.

Once that is done, you can highlight all the changed code, copy-paste into the comment box or the post editor window and submit your comment or publish your post.

For other special characters, refer to How to publish special characters (click BACK) button to get back to this page).

26 comments:

  1. thanks for your tips, wanna exchange our link?

    ffblast.blogspot.com

    ReplyDelete
  2. Hi Indra@,

    Glad you found the post useful. Regarding, link exchange, search engines often discount it.

    I visited your blog and found that it has only a few posts and some related to gadgets. Maybe I will link to your site on my Gizmos and Gadgets blog when you have more posts of that nature.

    Peter (Blog*Star)
    Blogger Tips and Tricks

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. You can put the < and > tags in the compose mode to, it doesn't matter once it's published.

    ReplyDelete
  5. Hi dman,

    If you had made a success using the way you described it, will appreciate if you can elaborate. Perhaps even a post.

    Peter (Blog*Star)
    Alternatives to AdSense

    ReplyDelete
  6. التفكير said...

    I am sorry for this late response as I didn't get email notification and also, I am sorry I have to delete your comment because you left a long URL (minus the http://)
    non-active (unclickable) long URL
    which became a long unbroken line that extend into the sidebar and makes the post look bad in most browsers and will probably cause the sidebar to slide to the bottom.

    That is the image URL and I am afraid I am not sure what you mean by firt letter and if you click the now active URL (link) above you will see the special code I use to display < in post and comments.

    Peter Blog*Star
    What a grateful blogger did for me
    (no one should feel obligated. Everything completely voluntary. However, by doing so, you may also help your visitors find helpful information and help. You may even pick up various ways of linking sites there too)

    ReplyDelete
  7. That's of great help to me, thanks! I’ve been trying to figure it out for a while now.

    ReplyDelete
  8. Hi! Peter,

    Thank you very much for this post, this is my problem for quite a while and now finally i know how to because of you...thanks a lot.

    keep posting...and keep helping.

    Iris

    ReplyDelete
  9. can you please tpye the modified
    img src="photo URL" code

    please type it as letters not as image ( as i cant see the letters correctly

    ReplyDelete
  10. Hi Mr. Arabic language?

    I am afraid I don't know what you want. Both the HTML (where I have to use special characters to display HTML as well as the graphic of the special characters are there in the post. If I actually type what you see in the graphic, you wouldn't see it as displayed in the graphic, but as HTML. So I don't know what is your point?

    Peter Blog*Star
    Blogger FAQ (Frequently Asked Questions_
    (Blogger FAQ in progress. More will be added as I have the time)

    ReplyDelete
  11. This has been plaguing me for some time. Your advice did the trick (once I noticed the semi colon).

    Thanks!

    ReplyDelete
  12. hai.. its me again.... do you speak malayan?? fffblast blog I have new blog.. visit www100x.blogspot.com

    ReplyDelete
  13. Hi indr@,

    Speak Malayan? You mean Malay? Why yes, apa khabar? Are you Malaysian?

    Peter Blog*Star
    Guide to Malaysia

    ReplyDelete
  14. Dear Peter Chen,

    seems like it's not working in comment box....what i get is just a < img src="photo url" >,it didn't show the image at all....am i did something wrong?

    ReplyDelete
  15. Hi Siau ?

    I am sorry the reference to <img> tag confused you. Images cannot be displayed in comments. What
    I am trying to illustrate is, for example, you want to teach a blog reader what to type in order to display an image, then they will have to ....

    Very hard to explain. Will think to see if I can edit the post to make it clearer later.

    ReplyDelete
  16. Thank you, Peter Chen,thank's for the reply. now i know image is not be able to display in comment box,hehe.anyway,thank you.

    ReplyDelete
  17. Thank you, I have been looking for an article like this. It is helpful.

    ReplyDelete
  18. thanks,
    i needed to show someone my template since he couldn't view it normally... so i tried to post it on the blog itself. It didn't work till i followed yr advice.

    :)

    http://roughcatholic.blogspot.com/2008/01/template-17jan2010.html

    ReplyDelete
  19. Thanks a lot for your help. I am going to use it to create a tutorial on HTML in my blog 'Cyber World'.
    You can see it for yourself; my blog's address is http://debsverdict.blogspot.com/

    I am sure that you will like it....

    ReplyDelete
  20. When i try to make a post, as i past the text at the bottom it reads, "Post was not saved due to form erros." So i have an empty blog as i cant post anything. Any ideas what to do?

    ReplyDelete
  21. i want to add a webpage in my blog please help me how to add a webpage in blog.. please give complete detail... what to do step by step...

    ReplyDelete
  22. and please also tell that where to insert the iframe....in post

    ReplyDelete
  23. Each post is a webpage by itself so to add webpage, just publish a new post. Sign into Dashboard > Post

    ReplyDelete
  24. YOu can add a iframe in post or sidebar

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...

Find topics by using the Google custom search box above which can search multiple blogs, or the SEARCH BLOG in the left corner of navbar. You can also find topics in the Label List and Categrories in the right sidebar.

For more information and special deals related to any of the issues on this page, place your cursor over the double-underlined links. All information supplied by Kontera.com.

Disclaimer: This blog has no relation with Wiley Publications