Last active
June 17, 2020 20:28
-
-
Save agustinpfs/71dca51b0127e478f182a81ae5cd01a9 to your computer and use it in GitHub Desktop.
HTML básico. Formularios.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- EJEMPLO 1 --> | |
<html lang="es"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Formularios</title> | |
</head> | |
<body> | |
<form action=""> | |
<strong>Campo de texto</strong><br> | |
Nombre | |
<input type="text"><br><br> | |
<strong>Radio Buttons</strong><br> | |
Masculino | |
<input type="radio" name="genero"><br> | |
Femenino | |
<input type="radio" name="genero"><br><br> | |
<strong>Checkboxes</strong><br> | |
Soy mayor de edad | |
<input type="checkbox" name="" id=""> | |
Acepto los términos | |
<input type="checkbox" name="" id=""><br><br> | |
<input type="submit" value="Enviar"> | |
</form> | |
</body> | |
</html> | |
<!-- EJEMPLO 2 --> | |
<!-- <html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>forms</title> | |
</head> | |
<body> | |
<form action="/archivo.php"> | |
<strong>type="text":</strong><br> | |
Nombre | |
<input type="text"><br><br> | |
<strong>type="radio":</strong><br> | |
Masculino | |
<input type="radio"><br> | |
Femenino | |
<input type="radio"><br><br> | |
<strong>type="checkbox":</strong><br> | |
Soy mayor de edad | |
<input type="checkbox"> | |
Acepto los términos | |
<input type="checkbox"><br><br> | |
<strong>type="email":</strong><br> | |
<input type="email"><br><br> | |
<strong>type="date":</strong><br> | |
<input type="date"><br><br> | |
<strong>type="password":</strong><br> | |
<input type="password"><br><br> | |
<strong>type="hidden":</strong><br> | |
<input type="hidden"><br><br> | |
<strong>type="submit":</strong><br> | |
<input type="submit" value="Enviar"> | |
</form> | |
</body> | |
</html> --> | |
<!-- EJEMPLO 3 --> | |
<!-- <!DOCTYPE html> | |
<html lang="es"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Formularios</title> | |
</head> | |
<body> | |
<form action=""> | |
<strong>Campo de texto con value</strong><br> | |
Nombre | |
<input type="text" value="Agustin"><br><br> | |
<strong>Campo de texto con size</strong><br> | |
Nombre | |
<input type="text" size="50"><br><br> | |
<strong>Campo de texto con placeholder</strong><br> | |
Nombre | |
<input type="text" placeholder="tu nombre"><br><br> | |
<strong>Campo de texto con required</strong><br> | |
Nombre | |
<input type="text" required><br><br> | |
<input type="submit" value="Enviar"> | |
</form> | |
</body> | |
</html> --> | |
<!-- EJEMPLO 4 --> | |
<!-- <html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Formularios</title> | |
</head> | |
<body> | |
<form action=""> | |
<label for="cnombre">Nombre</label><br> | |
<input type="text" id="cnombre" name="cnombre"><br> | |
<label for="capellido">Apellido</label><br> | |
<input type="text" id="capellido" name="capellido"> | |
<br> | |
<br> | |
<label for="paises">Elija pais</label><br> | |
<select id="paises" name="paises"> | |
<option value="argentina">Argentina</option> | |
<option value="brasil">Brasil</option> | |
<option value="chile">Chile</option> | |
<option value="uruguay">Uruguay</option> | |
</select> | |
<br> | |
<br> | |
<label for="mensaje">Mensaje</label><br> | |
<textarea id="mensaje" name="mensaje" rows="10" cols="30"> | |
</textarea> | |
</form> | |
</body> | |
</html> --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment