The First Principle: The Web Needs to Be a Two-Way Street

The fundamental truth is that a website isn't just a brochure for you to read. For the web to be useful, it needs a way to collect information from the user and send it back to the server.

Without this, you couldn't log in, search for a video, buy a product, post a comment, or send a message. The web would be a read-only library.

The Core Problem

How do we create a standardized, reliable system to:

  1. Display interactive fields for a user to fill in (text boxes, checkboxes, dropdowns).
  2. Package the user's data neatly.
  3. Send that package to a specific destination on a server.
  4. Tell the server how the data is being sent.

The logical solution to this entire problem is the HTML <form>.

The <input> Element: The Box for Your Stuff

This is the most common form tag. It's a self-closing tag that creates an input field. Its behavior changes based on its type attribute.

The most basic type is text.

<input type="text">