Dev Helpers
← Back

Empty editor prompt

Empty editor prompt with native CSS. The preview includes a small shared demo stylesheet.

Open this example in the interactive library

Source code

<style>
  .demo:empty::before {
    content: attr(data-hint);
    color: #475569;
  }
</style>
<div
  class="demo"
  contenteditable="true"
  role="textbox"
  aria-label="Note"
  data-hint="Enter a note"
></div>