How do I add a clear button to my input box?
The easiest way to add an input box with a clear button is to add an input element with the type attribute set to search . Then when we type into the input box, we see the clear button displayed. And we can click on it to clear its value.
How do you clear input in HTML 5?
To clear all the input in an HTML form, use the <input> tag with the type attribute as reset.