MDN self-hosted library · e01.org

HTMLTextAreaElement: placeholder property

HTML DOM

Open notebook · 1 cells web-api-instance-property upstream source

HTML DOM

The placeholder property of the HTMLTextAreaElement interface represents a hint to the user of what can be entered in the control. It reflects the textarea element's placeholder attribute.

Value

A string.

Examples

const textareaElement = document.getElementById("comment");
console.log(textArea.placeholder);

Specifications

Browser compatibility

See also

  • textarea
  • HTMLTextAreaElement.value