Add color to your code block
doldoki
Posted on December 26, 2021
So you started a blog on dev.to but when you wrote your code in a code block, you noticed this.
let str = 'Hello World';
console.log(str);
Fortunately, dev.to offers an easy way to add colors to your codes for better display and readability.
let str = 'Hello World';
console.log(str);
Simply add the name of your programming language right after the first three back-ticks(or the opening back-ticks) for your code block.
I tried Python, Javascript, and PHP. They all worked fine.
💖 💪 🙅 🚩
doldoki
Posted on December 26, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
webdev A Tale of WeakMap and WeakSet in JavaScript: The Guardians of Forgotten Secrets
November 29, 2024