Skip to main content

Command Palette

Search for a command to run...

How to style console.log() output with CSS

Updated
โ€ข1 min read
How to style console.log() output with CSS
P

Hi everyone ๐Ÿ‘‹

I am Palash, a passionate programmer & front-end developer. I like to share HTML, CSS, JavaScript and web development tips & tricks and try to explain them in a simple manner.

Happy Coding!

In this video, Iโ€™ll show you how to style console.log() output with CSS. We will use a CSS format specifier which allows us to customize the display in the console and we will also see few demos related to it.

Format specifier

A format specifier consists of a % symbol followed by a letter that indicates the formatting that applies to the value. The parameters following the string apply to the placeholders in order.

CSS Format specifier

The CSS format specifier allows us to customize the display in the console. We will need to start the string with the specifier (%c) and give the style you wish to apply as the second parameter.

Please check out this video where this is explained in full details:


Wrap Up

I hope you will find this video useful and learn something new in the process. If you want to learn more HTML, CSS, JavaScript and web development tips & tricks, please make sure to subscribe on YouTube!

C

Nice blog post, Palash!

More from this blog

C

Code with Palash

11 posts

Hi ๐Ÿ‘‹ I am Palash, a passionate programmer & front-end developer. I like to share HTML, CSS, JavaScript and web development tips & tricks and try to explain them in a simple manner. Happy Coding!