HTML form Tag

HTML form Tag defines a form element which is used to take input from the user. HTML Form Tag contain elements like input, select, option, submit, button, label, textarea, fieldset, optgroup, output etc.

Syntax of HTML form Tag

The Syntax of HTML form Tag is shown below, It has both starting and ending tags.

<form>
</form>

Usage of HTML form Tag

HTML form Tag is used to take the information from the user of website. HTML form takes data for submission into database or for further processing.

HTML form tag contain different types of elements for different types of data. These elements include input tag, file element, select element, option element, textarea, submit element, button tag, optgroup, fieldset, labels, output element and more.

HTML form element is validated using JavaScript to make sure that correct information is submitted.

HTML form Tag is a block level element.

Example of HTML form Tag

Simple example of HTML form Tag is shown below.

<form>
 <label>Name</label>    
 <input type='text'>
 <label>Gender:</label>
 <select id="select">
  <option>Male</option>
  <option>Female</option>
 </select>
 <input type='submit'>    
</form>

Output

The output of above code is shown below.

Browser Support for HTML form Tag

HTML form Tag is supported by all major browsers including Safari and Internet Explorer.

Global Attributes Support in HTML form Tag

The HTML form Tag supports all Global Attributes.

Event Attributes Support in HTML form Tag

The HTML form Tag supports all Event Attributes.

HTML form Tag Video

Watch our video on HTML form Tag.

HTML Comment Tag HTML Doctype Tag HTML anchor Tag HTML abbr Tag HTML acronym Tag HTML address Tag HTML applet Tag HTML area Tag HTML article Tag HTML aside Tag HTML audio Tag HTML b Tag HTML base Tag HTML basefont Tag HTML bdi Tag HTML bdo Tag HTML big Tag HTML blockquote Tag HTML body Tag HTML br Tag HTML Button Tag HTML Canvas Tag HTML Caption Tag HTML Center Tag HTML Cite Tag HTML Code Tag HTML Col Tag HTML colgroup Tag HTML data Tag HTML datalist Tag HTML dd Tag HTML del Tag HTML details Tag HTML dfn Tag HTML dialog Tag HTML dir Tag HTML div Tag HTML dl Tag HTML dt Tag HTML em Tag HTML embed Tag HTML fieldset Tag HTML figcaption Tag HTML figure Tag HTML font Tag HTML footer Tag HTML form Tag HTML frame Tag HTML frameset Tag HTML Heading Tags HTML head Tag HTML header Tag HTML hr Tag HTML html Tag HTML i Tag HTML iframe Tag