19. What is the purpose of placeholder?

The placeholder attribute provides a short hint about the expected value of a form control. It disappears when the user enters data and should not be treated as a permanent label.

Key Takeaways
  • Use labels for identification.
  • Use placeholders for supplementary hints.
Knowledge Check

Should placeholder normally replace a visible label?