How to Style console.log?
Aleksandr Ippatev
Posted on August 10, 2021
To add CSS styling to the console output, we use the CSS format specifier %c. Then we start the console message, which is usually a String with the specifier followed by the message we intend to log, and, finally, the styles we want to apply to the message:
console.log("%cThis is a green text", "color:green");
💖 💪 🙅 🚩
Aleksandr Ippatev
Posted on August 10, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.