Hi I was searching how to make the blog look more technical.
I have added a Syntax Highlighter JavaScript Library to the Blog Template.
It seems there are two ways of adding the code but I found this one to be the simplest one
I am checking this blog.
I have followed the steps as shown here
Using the tag "Pre" before the code
I have added a Syntax Highlighter JavaScript Library to the Blog Template.
It seems there are two ways of adding the code but I found this one to be the simplest one
I am checking this blog.
I have followed the steps as shown here
Using the tag "Pre" before the code
printf("Testing");Though it prints in a different format, I wanted a proper coding background the way we see in the IDEs or other coding platforms. I wanted something like this which I got from a website that creates the HTML
1 2 3 4 5 6 | int main { printf("Swagatha Ellarigoo");//testing } |
1 2 3 4 5 6 | int main { printf("Swagatha Ellarigoo");//testing } |
main() { printf("Hello World"); /* Testing Comments */ }So Finally I have one working solution. I used the prettify script and is working fine.
all we have to do is use
<pre class ="prettyprint"> MY CODE HERE </PRE> "It seems the language will be chosen automatically.The only criteria is to be in the HTML mode while adding the code and using the pre tags.
prettify looks good.
ReplyDelete