- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to display a short hint that describes the expected value of the element in HTML?
Use the placeholder attribute in HTML to display a hint describing the expected value of the element.
Example
You can try to run the following code to implement placeholder attribute −
<!DOCTYPE html> <html> <body> <h2>Login</h2> <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"> </form> </body> </html>
Advertisements