Forms
Forms can be used to send data across the web and are often used as contact forms to convert information inputted by a user into an email.
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.
The basic tags used in the actual HTML of forms are form, input, textarea, select and option.
The <form> tag is used to create an HTML form:
<form>
.
input elements
.
</form>
.
input elements
.
</form>
The input tag is the daddy of the form world. It can take ten forms, outlined below:
<input type="text" /> is a standard textbox. This can also have a value attribute, which sets the initial text in the textbox.
<form>
First name: <input type="text" name="firstname" /><br />
Last name: <input type="text" name="lastname" />
</form>
First name: <input type="text" name="firstname" /><br />
Last name: <input type="text" name="lastname" />
</form>
How the HTML code above looks in a browser:
<input type="password" /> is similar to the textbox, but the characters typed in by the user will be hidden.
<form>
Password: <input type="password" name="pwd" />
</form>
Password: <input type="password" name="pwd" />
</form>
How the HTML code above looks in a browser:
<input type="checkbox" /> is a checkbox, which can be toggled on and off by the user. This can also have a checked attribute, which would be used in the format <input type="checkbox" checked="checked" />, and makes the initial state of the check box to be switched on, as it were.
<form>
<input type="checkbox" name="vehicle" value="Bike" /> I have a bike<br />
<input type="checkbox" name="vehicle" value="Car" /> I have a car
</form>
<input type="checkbox" name="vehicle" value="Bike" /> I have a bike<br />
<input type="checkbox" name="vehicle" value="Car" /> I have a car
</form>
How the HTML code above looks in a browser:
How the HTML code above looks in a browser:
its not working....
ReplyDeleteplease send me correct contact us form coding on
sholatali@yahoo.com