I would like to display some text to the user when my div element is empty.
div
I have tried adding a placeholder attribute to my div but the t
There are lot of options using javascript, but if you want to do it in css.Try this:
html:
css:
[contentEditable=true]:empty:not(:focus):before{ content:attr(data-text) }
Demo