Insert formatted Code in your Programming blog/Website article/post
Are you having a blog/Website which has tutorials OR posts on any programming language.
You might be having trouble in writing code in the normal format.
To write the code in a particular coding format with proper color combination for different tokens, just as it looks like in the text editors for e.g Notepad++, SublimeText.
Refer this link: http://hilite.me/
JAVA code without line numbers:
PHP code in different them:
You might be having trouble in writing code in the normal format.
To write the code in a particular coding format with proper color combination for different tokens, just as it looks like in the text editors for e.g Notepad++, SublimeText.
Refer this link: http://hilite.me/
What to do on that link?
- You just have to write the code to be formatted in the source code container. You can write the code elsewhere(let say in text editors like Notepad++ OR SublimeText) and then just copy and paste the code, which would make your task easier rather than writing the code in that source container on that page itself.
- Choose a particular language from the language drop down. There are a whole lot of them available almost all of them.
- Choose a style of background/foreground from the style drop down.
- You can also change the CSS code of border element in the CSS text box like its padding and border and margin.
hilite.me |
Here are some Sample Hello World programs written in C,JAVA, php:
C code with Line Numbers:
1
2
3
4
5
| #include <stdio.h> void main() { printf("Hello World"); } |
JAVA code without line numbers:
public class HelloWorld{ public static void main(String[] args){ System.out.println("HELLO WORLD"); } }
PHP code in different them:
<?php echo "HELLO WORLD"; ?>
Comments
Post a Comment