Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
<!DOCTYPE html> <title>My Example</title> <div style="font:0.8em/1em Arial, Helvetica, Sans-Serif;"> <h4>Example 1 (for HTML 5 browsers)</h4> <label> Enter your favorite cartoon character:<br /> <input type="text" name="favCharacter" list="characters" maxlength="50" style="width:95%;"> <datalist id="characters"> <option value="Homer Simpson"> <option value="Bart"> <option value="Fred Flinstone"> </datalist> </label> <h4>Example 2 (for both legacy and HTML 5 browsers)</h4> <label> Enter your favorite cartoon character:<br /> <input type="text" name="favCharacter" list="characters" maxlength="50" style="width:95%;"><br /> </label> <datalist id="characters"> <label> or select one from the list:<br /> <select name="favCharacter"> <option>Homer Simpson <option>Bart <option>Fred Flinstone </select> </label> </datalist> </div>