WHAT ARE FORMS IN HTML
Form is nothing but entering the details into specific location for example text fields,checkbox,buttons etc.
online forms can be used in different purpose For example for online exam, online ticket booking,etc.
Forms are creating by inserting <form>....<?form>tags in the html code.
Example Program
<html>
<head>
<title>Forms</title>
</head>
<body>
<center><h1>Hello frnds</h1>
</center>
<Form>
<p><h5>Name:<input name="Name" type="Text" size="30"></p>(it display the onle line text field with 30 letters length)
<p><h5>Address:<textarea name="Address:" rows="5" cols="20"></textarea></p>(it display the text field for entering the data )
<br>
</br>
<input type="SUBMIT" value="SUBMIT">(it display the button of submit)
<input type="Reset" value="Reset">(it displays the reset button)
</form>
</body>
</html>
one form attribute that is password <input type="password" name="pwd">
one more attribute that is radio for using that select one in multiple options eg: gender
<input type="radio" name="gender" value="male"/>Male<br/>
<input type="radio" name="gender" value="female"/>Female
check box also similar as radio... it is used for selct multiple times in multiple options
<input type="checkbox" name="vehicle" value="car"/>i have a car<br/>
<input type="checkbox" name="vehicle" value="bus"/>i have a bus
simply copy the program and paste it on notepad and save with filename.html and open it on web browser
No comments:
Post a Comment