Code with Palash

Code with Palash

How to style console.log() output with CSS

How to style console.log() output with CSS

Listen to this article

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!

#coding#javascript#console#css#tips
 
Share this