Eight Simple Steps to Insert Highlighted Code Into Your Blogger (Blogspot) Post

With apologies to My Few Steps for stealing his thunder.

  1. Get into the Theme section of your blog


  1. In the updated page, use the dropdown to get to the Edit HTML section

  1. Now, get the code you need from highlightjs.org, which you need to insert into the HEAD portion of the HTML you see..


  1. Excellent. Now, paste this code in your HEAD section, being mindful to close the tag which our third-party-vendor hasn't bothered to do 😊

  1. Super. Now, a similar errand for the BODY. Unfortunately, you need two lines which aren't all in one place 😊 (one line from the same place as the above, the second from the Usage section) :


  1. Now, paste these two lines at the END of the BODY section :

  1. Then, use the magnificent Save button. 

  1. Believe it or not, you're all set. Want to add some code, just go into the HTML editor in your and add code such as :

<pre><code class="language-python">
# Roe Vs Wade
print("What are two ways of getting to America?")
</code></pre>

Gives you :
# Roe Vs Wade
print("What are two ways of getting to America?")

Comments

Popular Posts