In my posts I have put some code-snippets. I got some questions on how I did this. Well, to be honest, it is very easy.
I am using the <pre>-tag inside my post. Anything that is put between a <pre> and a </pre>-tag is handled by your browser as pre-formatted, and your browser leaves it as it is. You can add some styling to it inline, such as <pre style="font-size:90%;color:#009000;">, or you can add a class definition to your template skin.
If you want to display html-code inside your post, be aware that you have to replace every < by <, and every > by >.
4 New Gadgets from Blogger Buster
3 days ago

This is what people say:
I use Quick Escape to render code postable. I do it here:
http://www.accessify.com/tools-and-wizards/developer-tools/quick-escape/
I finally got a chance to try displaying code in a post. Thanks for reminding me how to do it. Thanks to Shelly too for the Quick Escape link.
thanks you so much for the tips hans.....really help so much.by the way,i have a problem with my blog about the underline link(blue).it's really stress me when i open my blog in firefox.how to remove the underline hans?but it look ok in my IE browser.
@nicolas: it appears that you have put a <u> and a </u> tag around the links inside your posts. It has nothing to do with the styling as such, that is okay. Edit your post, remove the underline, and it will be okay.
HI.I'M NEW LEARNING PROGRAMMING LANGUAGES I STARTET WITH HTML OF COURCE .
I TRIED THIS CODE BUT I DON'L FOLLOW "If you want to display html-code inside your post, be aware that you have to replace every < by <, and every > by >".
IF YOU PLEASE MORE DETAILS.
THANK YOU
@Anonymous: if you write html, you put tags in your document. <body> is a tag, for example.
In your html-document, the tag is not displayed; the tag tells your browser how to format the text that is in bewteen the two tags.
In our posts, where we are now and then giving examples of html-code, we want our tags to be shown. Therefore, if I use <h2> here in this comment, I don't want it to be interpreted by the browser as a header-tag, but just as plain text. To achieve this, in my texteditor I did not type "<h2>", but I typed "<h2>". I hope you understand it now. If not, use notepad, create a simple .html-document, and experiment to see the difference.
of cource,I am very happy for being able to understand the explanation And I'd Make the most beautiful site ever
Thank You Very Much And Happy Valentine Day
thanks you so much for the tips hans.....really help so much.
Digg / All News, Videos, &
Images
Thanks for the info.
thank for the tips.
Share your thoughts!
Feel free to post your questions, remarks and comments here. Moderation is set for this blog, so your comments will appear in due time.
Look who's linking here!
0 Backlinks point here