Sử dụng PrettyPrint
Github URL: https://github.com/googlearchive/code-prettify
<pre class="prettyprint"><code class="language-c">
// your code here
</code></pre>
Hoặc
<pre class="prettyprint">
// your code here
</pre>
Hoặc
<pre class="prettyprint linenums:4"
>// This is line 4.
foo();
bar();
baz();
boo();
</pre>
Hoặc
<style>
li.L0, li.L1, li.L2, li.L3,
li.L5, li.L6, li.L7, li.L8 {
list-style-type: decimal !important;
}
</style>
Hoặc
<pre class="result notranslate">
Book title : C Programming
Book author : Nuha Ali
Book subject : C Programming Tutorial
Book book_id : 6495407
</pre>
VD1:
<pre class="prettyprint"><code class="language-c"> // your code here </code></pre>
// your code here
VD2:
<pre class="prettyprint">// your code here </pre>
// your code here
VD3:
<code class="prettyprint"> // your code here </code>
VD4:
<pre class="prettyprint linenums:4">// This is line 4. foo(); bar(); baz(); boo(); </pre>
// This is line 4. foo(); bar(); baz(); boo();
VD5:
<pre class="prettyprint linenums:4">// This is line 4.
foo();
bar();
baz();
boo();
</pre>
<style>
li.L0, li.L1, li.L2, li.L3,
li.L5, li.L6, li.L7, li.L8 {
list-style-type: decimal !important;
}
// This is line 4. foo(); bar(); baz(); boo();
VD6:
<pre class="result notranslate">Book title : C Programming Book author : Nuha Ali Book subject : C Programming Tutorial Book book_id : 6495407 </pre>
Book title : C Programming Book author : Nuha Ali Book subject : C Programming Tutorial Book book_id : 6495407