Cargando...

Elementos de formulario HTML

El formulario es una caja de herramientas. Preguntas distintas, controles distintos.

Respuesta directa

Use label + controls such as input, textarea, select, and button. Group with fieldset and legend. Every control needs an accessible name (usually via label).

📊 Piezas comunes del form

Element Role
label Names a control for humans and assistive tech
input Many single-line / toggle controls (see Input Types)
textarea Multi-line text
select / option Choose from a list
button Actions (submit/reset/button)
fieldset / legend Group related controls with a title

Mixed controls sketch

html
HTML Code
<form action="/profile" method="post">
<fieldset>
<legend>Profile</legend>
<label for="bio">Bio</label>
<textarea id="bio" name="bio" rows="4"></textarea>
<label for="level">Level</label>
<select id="level" name="level">
<option value="beginner">Beginner</option>
<option value="middle">Middle</option>
</select>
<button type="submit">Save</button>
</fieldset>
</form>

Pruébalo

  1. fieldset + legend
  2. textarea + select with labels
  3. submit button
  4. keyboard reach each control

Errores fáciles

  • controls without labels
  • div title instead of legend
  • submit outside form

Resumen

  • match control to question
  • always label
  • fieldset/legend groups
  • details next lessons

🧠 Pon a Prueba tu Conocimiento

Listo para Empezar

Pon a Prueba tu Conocimiento

Ponte a prueba con este cuestionario interactivo y descubre qué tan bien entiendes el tema

❓
5
Preguntas
🎯
70%
Para Aprobar
♾️
∞
Tiempo
🔄
∞
Intentos

📝 Instrucciones

  • Lee cada pregunta cuidadosamente
  • Selecciona la mejor respuesta para cada pregunta
  • Puedes repetir el quiz tantas veces como quieras
  • Tu progreso se mostrará en la parte superior