You're lucky if you click here. Chance of a lifetime!

Add Syntax Highlighting in your Blogger Website

عبدالرحمن

 

Hello, Guys Welcome to apps2link World. In this post, I am going to give you the Syntax Highlighting code for Blogger. So let's check.

What is Syntax Highlighting | highlight.js

Syntax Highlighting is a feature that gives you the facility to Highlight codes over 196 languages on your website with the help of highlight.js.

Benefits of using Syntax Highlighting

1. This Syntax Highlighting was responsive 
2. Gives colours to your highlighted codes
3. Gives a professional and simple look
4. Highlight codes fastly

How to add Syntax Highlighting to your Blogger website?

First copy this code then paste above </head> or &lt;!--<head/>--&gt;&lt;/head&gt;

<link href='https://cdn.jsdelivr.net/npm/highlight.js@11.3.1/styles/agate.css' rel='stylesheet'/>

Then paste this code above </body> or &lt;!--</body>--&gt;&lt;/body&gt;

<script src='//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/highlight.min.js'/>
   <script>hljs.initHighlightingOnLoad();</script>

Usage

Use this code for displaying code in your post
<pre><code>your_code_here</code></pre>

Add your code on your_code_here text.

If auto-highlighting code not worked

<pre><code class="language-html">your_code_here</code></pre>

Use this code for displaying code in your post. For example, there gave html change it with your language and Add your code on your_code_here text.

Last words

Hope this post will help you also, check more in apps2link  Thanks for reading! 

Tutorial video coming soon!

إرسال تعليق

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.