-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform004.html
36 lines (36 loc) · 1.47 KB
/
form004.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Formulário</title>
</head>
<body>
<h1>Exemplo de formulário</h1>
<form action="cadastro.php" method="get" autocomplete="on">
<fieldset>
<!-- Fieldset serve para separar seus formulários por assuntos, agrupa-los. -->
<legend>Dados Pessoais</legend>
<p>
<label for="inome">Nome</label>
<input type="text" name="nome" id="inome" minlength="5" maxlength="20" required placeholder="Nome do usuário">
</p>
<p>
<label for="iemail">Email</label>
<input type="email" name="email" id="iemail" autocomplete="email" required placeholder="Senha">
<!-- Verifica se o email tem um arroba -->
</p>
<p>
<label for="itel">Telefone</label>
<input type="tel" name="tel" id="itel" autocomplete="tel" pattern="^[0-9]{4,5}-[0-9]{4}$" required placeholder="xxxxx-xxxx">
<!-- 4 a 5 digitos de 0 a 9 seguidos de um traço e novamente 4 digitos de 0 a 9 -->
</p>
</fieldset>
<p>
<input type="submit" value="Enviar">
<input type="reset" value="Limpar">
</p>
</form>
<!-- Estudar mais bore RegEx. Expressões Regulares: Começam sempre com ^ e terminam com $ -->
</body>
</html>