Forms · Formas
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · Esta página necesita un navegador reciente (con soporte para SharedArrayBuffer). Por favor, actualiza Chrome, Edge, Firefox o Safari a la última versión.
English
Forms
- A form lets people type things in — a name, a message, a search.
- The boxes you type in are called inputs.
- A text box is
<input type="text">— a single tag, like<img>.
Español
Formularios
- Un formulario permite a las personas escribir información: un nombre, un mensaje, una búsqueda.
- Las cajas en las que se escribe se denominan entradas.
- Una caja de texto es
<input type="text">— una etiqueta única, como<img>.
English
Labels and buttons
- A
<label>is the words next to an input, telling the user what it is for. - A
<button>is something to click — like Send or Search. - We won't actually send anything here — we're just learning the tags.
Español
Etiquetas y botones
- Una
<label>son las palabras junto a una entrada, indicando al usuario para qué sirve. - Una
<button>es algo que se puede hacer clic, como Enviar o Buscar. - Aquí no enviaremos nada realmente; solo estamos aprendiendo las etiquetas.
<label>Your name:</label>
<input type="text">
<button>Send</button>
English
Common mistakes
- Every input should have a matching
<label>. - A button in a form submits it by default — use
type="button"to stop that.
Español
Errores comunes
- Cada entrada debería tener una
<label>correspondiente. - Un botón dentro de un formulario lo envía por defecto; utiliza
type="button"para evitarlo.
English
Now you try
- Inputs and buttons are the building blocks of every form on the web.
- Add a text box, then a button.
Español
Ahora tú practica
- Las entradas y los botones son los bloques fundamentales de cualquier formulario en la web.
- Añade una caja de texto, seguida de un botón.
Add a box the user can type in. Use <input type="text"> (a single tag, like <img>). · Agregue un cuadro en el que el usuario pueda escribir. Use <input type="text"> (una sola etiqueta, como <img>).
Add a button that says Send · Enviar. Use <button>Send</button>. · Agregar un botón que diga Send · Enviar. Usar <button>Send</button>.