Smathermather's Weblog

Remote Sensing, GIS, Ecology, and Oddball Techniques

HTML Tags for code pre & code tags

Posted by smathermather on July 16, 2011

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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: