Filter (Advanced Search)
Downloads
1
Views
225
Video

Video is not available... Embedded is previous playlist.

Details

The HTML <form> element is used to create an HTML form for user input:

<form>
.
form elements
.
</form>

The <form> element is a container for different types of input elements, such as: text fields, checkboxes, radio buttons, submit buttons, etc.

 

The <input> Element

The HTML <input> element is the most used form element.

An <input> element can be displayed in many ways, depending on the type attribute.

Here are some examples:

Type Description
<input type="text"> Displays a single-line text input field
<input type="radio"> Displays a radio button (for selecting one of many choices)
<input type="checkbox"> Displays a checkbox (for selecting zero or more of many choices)
<input type="submit"> Displays a submit button (for submitting the form)
<input type="button">

Displays a clickable button

 

ਵੈਬ-ਫਾਰਮਰਜ਼ ਵਿਚ ਵਰਤੇ ਜਾਣ ਵਾਲੇ ਵੱਖ-ਵੱਖ ਕੰਟਰੋਲ ਦੇ ਨਾਮ 

•  ਟੈਕਸਟਬਾਕਸ ਕੰਟਰੋਲ 
•  ਚੈੱਕਬਾਕਸ ਕੰਟਰੋਲ 
•  ਰੇਡੀਓ ਬਟਨ ਕੰਟਰੋਲ 
•  ਬਟਨ ਕੰਟਰੋਲ 
•  ਸਬਮਿੱਟ ਬਟਨ ਕੰਟਰੋਲ 


<!DOCTYPE html>
<html>
<body>

<h2>Text input fields</h2>

<form>
  <label for="fname">First name:</label><br>
  <input type="text" id="fname" name="fname" value="Bintu" size="30"><br><br>
  <label for="lname">Last name:</label><br>
  <input type="text" id="lname" name="lname" value="Chaudhary"><br><br>
</form> 

<p>Note that the form itself is not visible.</p>

<p>Also note that the default width of text input fields is 20 characters.</p>
</body>
</html>



This is how the HTML code above will be displayed in a browser:

  First name:
  
  Last name:
  

 
Ad