Inserting Source Code into a Blog Page
Friday, December 10, 2021
To list "source code" into a blog page, insert the following HTML codes:
For example, the following is a simple "Hello World" program in the C language.
<pre style="background: rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: courier; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;">
<code style="color: black; overflow-wrap: normal; word-wrap: normal;">
PLACEHOLDER
</code></pre>
For example, the following is a simple "Hello World" program in the C language.
#include <stdio.h>
main(void) {
printf("Hello World!\n");
}
Take Note
- Replace character "less than" ( < ) with "<"
No comments:
Post a Comment