23

Example screenshot from the JavaScript console (Google Chrome 35, Win7) on a Facebook page:

Example screenshot

How is this done? Is there a way to inspect/debug the console?

3

1 Answer 1

37

Console API Reference:

https://developers.google.com/web/tools/chrome-devtools/console/console-write#styling_console_output_with_css

Nice example of using the console.log:

console.log("%cUser %s has %d points", "color:orange; background:blue; font-size: 16pt", 'User', 100);

Just paste it into the console :)

Not the answer you're looking for? Browse other questions tagged or ask your own question.