Daily Software Tips & Tricks
Bite-sized knowledge to improve your coding skills daily.
Level up your debugging with CSS in the console
April 8, 2026
When you're debugging a complex application, your browser console can quickly become a wall of indistinguishable text. To make your specific debug messages stand out, you can actually style them using CSS directly in the console.log statement.
Just start your log string with %c and pass the CSS styles as the second argument. For example, console.log('%c API SUCCESS', 'color: #00ff00; font-weight: bold;') will print a bright green message. It's a fantastic way to visually flag important state changes or lifecycle events without losing them in the noise of other logs.