DEV Community


Error console highlighting

raphink profile image Raphaël Pinson ・1 min read

When composing posts on, is there a way to dispensary display error messages so they appear as console output, but in red?

I've tried things like:

My error message


<code style="color:red;font-weight:bold">
My error message
Enter fullscreen mode Exit fullscreen mode

to no avail…

Is there a way to achieve this?

Discussion (3)

3in0 profile image

This works on its own but wouldn't be any use if you wanted to embed the message..

some message

raphink profile image
Raphaël Pinson Author

Good one!

Except some words come out green with CSS:

Failed to retrieve catalog for from puppetserver in environment catalog_diff: Failed to open TCP connection to puppetserver:8140 (No route to host - connect(2) for "puppetserver" port 8140)
3in0 profile image

Looks like it is still highlighting the valid CSS :) The green looks pretty cool among the red

Forem Open with the Forem app