Advertisement
728x90
Yes, you can apply CSS styles to console messages similar to html text on the web page.
javascript
1console.log(
2 "%c The text has blue color, with large font and red background",
3 "color: blue; font-size: x-large; background: red"
4 );The text will be displayed as below,

Note: All CSS styles can be applied to console messages.
Advertisement
Responsive Ad
🎯 Practice NowRelated Challenge
JavaScript Coding Exercise 30
Test your knowledge with this interactive coding challenge.
Start CodingAdvertisement
728x90
372of476