HTML text Attribute

Last Updated : 3 Apr, 2026

Defines the behavior and properties of single-line text input fields in HTML forms, allowing users to enter and submit textual data.

  • Used with to accept single-line user input.
  • Supports attributes like placeholder, maxlength, and required.
  • Commonly used for names, emails, and short text entries.

Syntax: