Monday, June 8, 2009

Displaying HTML Code within Your Post (the Easy Way)

Have you ever tried to show code within your post? If you just type in the code, it doesn't work because the code will be interpreted and do what you're trying to display.

Here's an easy way to display code within your blog post.
  1. Within Blogger, click on the Posting tab, then the Create link.

  2. Click on the Html tab on the top right corner of your post box.

  3. Type the following code into your post*, wherever you want it to display:


  4. It displays like this:

  5. --Type Your Code Here--


  6. Make adjustments to the display.
  • If you want a thicker border, change the 1px to 2px or more.
  • If you want no border, change the 1px to 0px.
  • If you want a solid line, change dotted to solid.

This is the easiest way to display code but there is another way I like better because it gives me more control over the display details. This way is how I display code in the posts for this blog, with the exception of this post.

*The only time this doesn't work is if you're displaying the code for this effect. Then you have to make it an image.



---------
©Karlene Browning, Karlene's Cheat Sheet.

0 comments:

Post a Comment

Did this post help? Did you find an easier way to do this? Let me know.