How to display a short hint that describes the expected value of the element in HTML?

HTMLWeb DevelopmentFront End Technology

Use the placeholder attribute in HTML to display a hint describing the expected value of the element.


You can try to run the following code to implement placeholder attribute −

<!DOCTYPE html>
      <form action = "/new.php">
         <input type = "text" placeholder = "Student UserName" name = "name"/><br>
         <input type = "password" placeholder = "Password" name = "password"> <br><br>
         <input type = "submit" value = "Submit">
Published on 14-Mar-2018 14:39:24