HTML Basic Part-4 HTML Forms Element

HTML Basic Part-4: HTML Forms Element

Today we will learn how to create HTML forms. First, we need to know what a form can contain. A form that can contain is as follows:

  • Text Field – Here is a user name, age, or other information.
  • Password Field – The user password is written here.
  • Radio Button – Round tick button.
  • CheckBox – Square Tick Butt.
  • Dropdown List – Information List.
  • Text Area – A place to write big information.
  • Button – Button.
  • Submit Button – Information Send Button.
  • Now we’ll learn how to make these.

Text Field:


Type the code below to create the text field. Name:

<form>
Name: <input type"text" name"name" /><br/>Occupation: <input type"text" name"profession"/>
</form>

Here we have text edited in input type because we created Text Field.

Password Field:


Type the code below to create the password field.

<form>
Hidden number:<input type"password" name"pwd" />
</form>

Here we have created password field because we have given the password in input type.

Radio Button:


Type the code below to create the Radio Button.

<form>
<input type"radio" name"sex" value"male"/> male<br/>
<input type="radio" name="sex" value="female"/>Female
</form>

Here we have radio in input type because we created the radio button.

Check Box:


Type the code below to create the check box.

<form>
<input type"checkbox" name"sex" value"male" /> Male<br/ > s
<input type="checkbox" name="sex" value="female" /> Female
</form>

Here we put the checkbox in the input type because we created the check box.

Drop-down List:


Type the code below to create the Drop-down List.

<form action="">

<p>Who will go home???</p>

<select name="go_home">

<option value="i">i</option>

<option value="you">You</option>

<option value="he_she">Him</option>

</select>

</form>

Text Area:


Type the code below to create the Text Area.

<textarea rows="10" cols="30">

Here you write about your love.

</textarea>

Button:


Type the code below to create the button.

<form action="">
<input type"button" value="Press">
</form>

Here we put the button on the input type because we created the button.

Submit Button:


Type the code below to create the Submit button.

<form name="input" action=" " method=" ">
<input type="submit" value="Submit" />
</form>

Here we have created the Submit button, so we have input type=”submit”

ajax loader HTML Basic

0Shares

Leave a Reply

Your email address will not be published. Required fields are marked *