(Guide) How to write HTML/JavaScript in Blogger Blog posts to show it as text?

UPDATE: The feature described in method 2 below is now available in main Blogger itself (no need to go to draft.blogger.com). To use it while writing post, click “Post Options” (Bottom right of the compose box). From the expanded menu check the box “Show HTML literally” and done. Now Blogger will not interpret the written code. The easy way out…

html code blogger

This post is an extension of my previous popular post “How to write HTML code in blogger blog post”. While creating new post in blogger, when HTML/JavaScript is written in Compose/HTML box, blogger tries to execute it (Rather than showing it as a text). Thus it becomes a nuisance when one writes a long code to share with readers but nothing shows up (Textually) on publishing the post. Fortunately there are at least three solutions to this problem as I know:

1. Use HTML/JavaScript parser

Go to Blogger HTML/JavaScript code parser and paste (or write) your code in the box and press “Convert”. A modified code will appear in the box, copy this code and paste in your post compose box and that’s it, as simple as that. Update – This method no longer works!

2. Use Blogger draft to create posts

(As Google guys have finally listened and incorporated an official solution to this problem in Blogger itself) – Blogger Draft is actually Blogger’s extension in which Google incorporate new experimental features to test them. When tested successfully, these features are added to main Blogger. Login to Blogger Draft and go to New Post. Click “Post options”, this will open many options. Select “Compose Settings” to “Show HTML literally” and bingo now you can write HTML/JavaScript as such in the “Compose/Edit HTML” box. You will also find many new features in Blogger Draft.

3. Manually change your code

Change all < characters to &lt; and all > to &gt; (Use “Replace” feature of any word processing software e.g. Microsoft Word to change the characters easily and speedily).

Leave a Reply

Your email address will not be published. Required fields are marked *