OverText is great for providing contextual hints about an input field. For example, an input field that takes a birth date could suggest the proper date format, or a password text field could give the user a reminder to use a strong and memorable password. In some instances, you may even consider replacing input labels with OverText to save some space. In this simple web form example, we'll use OverText for input fields.
Let us create the HTML web form. We have three input fields with IDs of
name, email
, anddateofbirth
. They also have corresponding labels for semantics and web accessibility. The most important thing to note is that ourinput
elements havealt
properties: the value of itsalt
property will be the text that will be shown as an over text.<body> <h1>Web Form with OverText</h1> <form> <p> <label for="name">Name: </label> <input id="name" alt="Enter first and last name" type="text...