Writing a blog can be fun and possibly, for the reader, educational. As i enjoy technology, it satisfies a creative urge to write on discoveries i come across in the wonderful world of technology. Often this takes the form of developing code for various platforms in a variety of different languages. One problem i find in blogging platforms is the ability to format and display segments of software code in a pleasing fashion.This wordpress platform has several features to do so.
The html <pre> and <code> elements provide some scope for this. With these html tags, i can present fragments of code and script in several languages. The actual presentation of these elements can be marked up with additional CSS. This gives me a wider scope to show my findings in an appealing way.
Ok, let’s cover this again : the files we need to invoke syntax highlighting total a minimum of seven files.
- shCore.css – the foundation style markup for syntax highlighting
- shCoreDefault.css – foundation coloring
- shCoreMidnight.css – one of three theme support files, this theme is Midnight
- shThemeDefault.css – a base theme with default values if no other theme chosen
- shThemeMidnight.css – a color scheme for the shCoreMidnight.css theme
These files will need to be declared in your html page. See my example in next post. Here is a squint at the html markup for that example page :
To Recap :
IN part two, we’ll explore further requirements to make this all work.