08: Forms

Forms are easily the most complicated part of HTML because they take input from the user and send it to the server for processing. To accomplish this the HTML form system includes many User Interface (UI) controls from your main operating system, and needs a way to package users' inputs to send to the server. For users the forms can be mostly simple text inputs and buttons, but for the programmer there are many complexities.

A Simple Login Form

The easiest demo is to start with a form nearly everyone has used: the login. If you've used any computer you know there's a login form that asks for your username and password, then there's a button to login (or you just hit enter). The simplest way to create a login form in HTML is like this:

    <input type="text" name="name">
    <input type="password" name="password">
    <input type="submit" value="Login">

Learn JavaScript Today

Register today for the Beginner Basics course and get the new releases by just paying the difference. There's also special discounts for existing customers when new courses are released.

Still Not Sure? Check out more curriculum!