HTML Table Attributes

Learn how to use the border, cellpadding, and cellspacing attributes to control table appearance and spacing.

Creating HTML Forms

Forms are one of the most interactive parts of the web, used for everything from login pages to contact forms. Let's learn the basic tags to build one!

The <form> Tag

The <form> element is a container for different types of input elements, such as text fields, checkboxes, radio buttons, submit buttons, etc.

The <label> Tag

The <label> tag defines a label for many form elements. It improves accessibility by linking text to an input field.

The <input> Tag

The <input> element is the most used form element. It can be displayed in many ways, depending on the `type` attribute (e.g., `text`, `password`, `submit`).

Practice Zone


Interactive Test 1: Drag & Drop

Arrastra en el orden correspondiente.


Arrastra las opciones:

<tr>
<th>Product</th>
<th>Price</th>
<table border="1">

Completa el código:

______
______
______
______

Interactive Test 2: Fill in the Blanks

Rellena los huecos en cada casilla.

<form>
  <label for="fname"></label>
  <input type="" id="fname">
</form>

Practice Example: Code Editor

Create a form with a label for "Email" and a text input field for the user to enter their email.

* Write the code below. Correct characters will be shown in green and incorrect ones in red.

<form> <label for="email">Email:</label> <input type="text" id="email" name="email"> </form>

Knowledge Check

Which tag is used to create a text input field in a form?