HTML Layout - Useful Tips CREATED BY =JAY-AR SIMON SEBASTIAN

Start from the beginning
                                        

Create password field

How to create a password field.

(You can find more examples at the bottom of this page)

HTML Forms

HTML forms are used to pass data to a server.

A form can contain input elements like text fields, checkboxes, radio-buttons, submit buttons and more. A form can also contain select lists, textarea, fieldset, legend, and label elements.

The <form> tag is used to create an HTML form:

<form>

.

input elements

.

</form>

HTML Forms - The Input Element

The most important form element is the input element.

The input element is used to select user information.

An input element can vary in many ways, depending on the type attribute. An input element can be of type text field, checkbox, password, radio button, submit button, and more.

The most used input types are described below.

Text Fields

<input /> defines a one-line input field that a user can enter text into:

<form>

First name: <input /><br />

Last name: <input />

</form>

How the HTML code above looks in a browser:

First name:  

Last name: 

Note: The form itself is not visible. Also note that the default width of a text field is 20 characters. 

Password Field

<input /> defines a password field:

<form>

Password: <input />

</form>

How the HTML code above looks in a browser:

Password: 

Note: The characters in a password field are masked (shown as asterisks or circles). 

Radio Buttons

<input /> defines a radio button. Radio buttons let a user select ONLY ONE one of a limited number of choices:

<form>

<input /> Male<br />

<input /> Female

</form>

How the HTML code above looks in a browser:

 Male

 Female Checkboxes

<input /> defines a checkbox. Checkboxes let a user select ONE or MORE options of a limited number of choices.

<form>

<input /> I have a bike<br />

<input /> I have a car 

</form>

How the HTML code above looks in a browser:

 I have a bike

You've reached the end of published parts.

⏰ Last updated: Dec 13, 2014 ⏰

Add this story to your Library to get notified about new parts!

HTML Layout - Useful Tips  CREATED BY =JAY-AR SIMON SEBASTIANWhere stories live. Discover now