HTML Tags for code pre & code tags

I’ve spent little time looking at the formatting on my blog.  As the code has gotten longer, it’s gotten unacceptable that tabs and other formatting don’t show up correctly.  A little google-fu and thanks to this blog post:
http://www.sohtanaka.com/web-design/styling-pre-tags-with-css-code-block/
I’ve reformated 25+ of my posts with more readable code with tabs and the whole bit.  I could go through and reformat everything, but I probably wont.

Anyway, the short and long of it is to use <pre> tags and <code> tags in tandem, which circumvents the problem of escaping all the special characters, including tabs.  Yay for a more readable blog.  (Yes, it happens to be a very quiet Saturday night :).

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.