Thursday, May 31, 2018

How to highlight code in blogger or blogspot.com?

<pre class="prettyprint"><code class="language-html">YOUR CODE HRER</code></pre>
Above the code is for HTML. If you want to use syntax highlighter for specific style or language, you must replace language-HTML with language-value. Given the value and attribute of some style or language:
Highlight ForvalueAttribute
HTMLhtmllanguage-html
CSScshlanguage-
JavaScriptjslanguage-js
XMLxmllanguage-xml
xHTMLxhtmllanguage-xhtml
Cclanguage-c
C++cpplanguage-cpp
C#cslanguage-cs
PHPphpLanguage-php
Pythonpylanguage-py
Javajavalanguage-java
Rubyrblanguage-rb
Perlperllanguage-perl
Resource Link: https://www.compromath.com/code-formatting-syntax-highlighter-for-blogger/

No comments:

Post a Comment