I had to follow a few different explanations on how to employ syntax highlighting on Blogger before I found a set of instructions that worked. In case anyone else is interested in posting some code onto their site, I would highly recommend checking out
this blog, which has a nice visual walk through and the necessary code available. It only took me a few minutes to set up. Below are a couple of brief examples (including the one on the post) of what the highlighting looks like.
<?php
$example = range(0, 9);
foreach ($example as $value)
{
echo $value;
}
#Here are some examples of syntax highlighting
"""This is a doc string."""
def Example(name):
for i in range(4):
print "Hello, %s!" %name
Example("Dan")
No comments:
Post a Comment