Skip to content

Instantly share code, notes, and snippets.

@thulioph
Last active December 21, 2015 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thulioph/6224690 to your computer and use it in GitHub Desktop.
Save thulioph/6224690 to your computer and use it in GitHub Desktop.
<h1>html5 attr autofocus</h1>
<label>Input de texto:</label>
<input type="text" placeholder="input type text">
<br />
<label>Input de e-mail:</label>
<input type="email" placeholder="input type e-mail" autofocus>
<br />
<label>Input de senha:</label>
<input type="password" placeholder="input type password">
<br />
<label>Input de telefone:</label>
<input type="tel" placeholder="input type tel">
<p>
<span>OBS</span>: Acima existem vários inputs, o foco será no input email;
<br />
Basta incluir autofocus no input desejado e <i>voilà</i>!
</p>
body{
font-size: 12px;
font-family: "Trebuchet MS", Helvetica, sans-serif;
}
span{
background: yellow;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment