I have been using Alex Gorbatchev Syntax Highlighter for a long while now . someone requested me to write an article about using this syntax highlighter in blogger so here i go .
Select a theme for the syntax highlighter , those links have previews of the theme.
After adding those codes now it's time to set your theme to the syntax highlighter , in the third line of code that i gave before . this parameter is what i meant
now after styles/ add the theme style , you can see the theme style right after the theme preview link . for example i have selected shThemeRDark.css then my parameter would look like this
Select a theme for the syntax highlighter , those links have previews of the theme.
- Default - shThemeDefault.css
- Django - shThemeDjango.css
- Eclipse - shThemeEclipse.css
- Emacs - shThemeEmacs.css
- Fade To Gray - shThemeFadeToGray.css
- Midnight - shThemeMidnight.css
- RDark - shThemeRDark.css
After adding those codes now it's time to set your theme to the syntax highlighter , in the third line of code that i gave before . this parameter is what i meant
now after styles/ add the theme style , you can see the theme style right after the theme preview link . for example i have selected shThemeRDark.css then my parameter would look like this
Now you have successfully added the syntax highlighter now save your template and now we will test the syntax highlighter . you cannot just add the code and let it define the language , you should define the language in the tag . you can see what language we can highlight from here . coming to the point i will show you how to syntax highlight a java hello world program .
go to the HTML tab in your post and find where you want the syntax highlighter to be and here we go
replace ____ with your language name and replace codes with your codes and that's how it works . here is a sample of the syntax highlighter.
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
Thanks For Reading , Have A Great day .












