How to highlight syntax in Google docs without any add-on?

How to highlight syntax in Google docs without any add-on?

April 27, 2020 / Nirav Shah

DocumentatIon is one of the most important aspects of any successful software project. With the advent of numerous collaborative tools, everyone can contribute their part easily in building a good document irrespective of where and how it would be used. Google Docs is one of such tools that is widely used by teams across the globe.

Now if you are adding any code in Google Doc and want it to show as code rather than plain text, please use bookmark this tool, as it comes very handy in separating code from plain text. Beware of your prejudice as the tool might seem incomplete to you. But believe us, it’s complete and fully functional.

No rocket science in its steps, simple copy and paste.

  1. Copy your code in the source code box and click highlight.
  2. Select the code shown in preview box.
  3. Copy and paste the code from preview box to your Google document.

and voila, it will show as well formatted code. You can also use from a number of given highlighting styles. And to make it even more crispy, it even generates the required HTML code, which you can directly use in any webpage.

A demo script is given below

Normal text Highlighted text
#Legal variable names: #Legal variable names:
myvar = “John” myvar = “John”
my_var = “John” my_var = “John”
_my_var = “John” _my_var = “John”
myVar = “John” myVar = “John”
MYVAR = “John” MYVAR = “John”
myvar2 = “John” myvar2 = “John”

Talk to AWS Certified Consultant

    Spread Love By Sharing:

    Let’s Talk About Your Needed AWS Infrastructure Management Services

    Have queries about your project idea or concept? Please drop in your project details to discuss with our AWS Global Cloud Infrastructure service specialists and consultants.

    • Swift Hiring and Onboarding
    • Experienced and Trained AWS Team
    • Quality Consulting and Programming
    Let’s Connect and Discuss Your Project