Skip to content

Instantly share code, notes, and snippets.

@jsocol
Created December 3, 2012 23:03
Show Gist options
  • Select an option

  • Save jsocol/4198920 to your computer and use it in GitHub Desktop.

Select an option

Save jsocol/4198920 to your computer and use it in GitHub Desktop.
forms test
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Forms!</title>
<style>
input {
display: block;
font-size: 150%;
}
input:invalid:not(:focus) {
background-color: #fcc;
}
input:focus {
background-color: #fff;
}
</style>
</head>
<body>
<form method="post">
<input type="text" placeholder="Text">
<input type="email" placeholder="Email">
<input type="url" placeholder="URL">
<input type="number" placeholder="Number" pattern="\d*">
<input type="tel" placeholder="Telephone">
<input type="search" placeholder="Search">
<input type="range" placeholder="Range">
<input type="datetime-local" placeholder="Datetime">
<input type="text" placeholder="Example" pattern="\d+ \w+">
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment