Hello everyone!
Today I'll show you a way how to post your code like a normal text. Recently I was looking after a way to write a code on the blog without having an effect on the blog. And most of the information that I found is about using the code and pre - tag. For me it didn't work so I searched with another terms finding something good.
It's annoying always doing a screenshot to show the others the code that they should use or something like that. In my opinion there are two ways and one of them is really useful and easy.
1. Post your code in the compose part
Yeah, it looks like a normal text and it's not evident, and this is why you should create a table first. Go and write the code for the table in the HTML part.
[Click on HTML]
Then write the code.
Example:
Of course, you can change the style the way you want it to be. Or you can create the table with this site: http://www.tablesgenerator.com/html_tables
Then go to the compose part and paste your code instead of the CONTENT. And that's it! Done :)
2. Format your code with a site
Click on the link: http://formatmysourcecode.blogspot.de/ and paste your code. This will create the code in text form. Than copy the HTML text and paste it in the HTML part in your post.
If you want to change the aspect than change just this part:
Thank you! ^.^
It's annoying always doing a screenshot to show the others the code that they should use or something like that. In my opinion there are two ways and one of them is really useful and easy.
1. Post your code in the compose part
Yeah, it looks like a normal text and it's not evident, and this is why you should create a table first. Go and write the code for the table in the HTML part.
[Click on HTML]
Then write the code.
Example:
| <table style="border:solid 1px green;"> <tr> <th> CONTENT </th> </tr> </table> |
|---|
Then go to the compose part and paste your code instead of the CONTENT. And that's it! Done :)
2. Format your code with a site
Click on the link: http://formatmysourcecode.blogspot.de/ and paste your code. This will create the code in text form. Than copy the HTML text and paste it in the HTML part in your post.
If you want to change the aspect than change just this part:
<pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%">
I hope this post helped you. Let a comment if you want to add something. Thank you! ^.^



