Skip to content

Instantly share code, notes, and snippets.

@webinista
Last active October 12, 2015 14:48
Show Gist options
  • Save webinista/4043042 to your computer and use it in GitHub Desktop.
Save webinista/4043042 to your computer and use it in GitHub Desktop.
Datalist in action
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title><datalist in actino></title>
<link rel="stylesheet" href="s.css" media="screen">
<style media="screen">
p{
font: bold 100% / 1.5 sans-serif;
}
input{
font:inherit;
font-weight:normal;
}
</style>
</head>
<body>
<form action="/formhandler" method="post">
<p>
<label for="destinations">Destination:</label>
<input type="text" id="destinations" name="destinations" value="" list="listofplaces">
<datalist id="listofplaces">
<option>Accra, Ghana</option>
<option>Buenos Aires, Argentina</option>
<option>Los Angeles, California, USA</option>
<option>New York City, New York, USA</option>
<option>Oslo, Norway</option>
<option>Paris, France</option>
</datalist>
</p>
<p><button type="submit">Submit</button></p>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment