Forms

Forms are very useful in collecting data from users and then send it to a web server for further processing. The form element creates an area for data input elements and designates the URL to which any collected data will be transmitted.

An HTML5 example about forms is shown:

			<!DOCTTYPE html> 
<!--Example 1: Forms.html -->
<html>
<head>
<title> Forms example </title>
</head>
<body>
<h1> Here is an example of a feedback form </h1>
<form method="post" action="http://www.google.com">
<p>
<label> First Name
<input type="text" name="fname" required >
</label>
</p>
<p>
<label> Last Name
<input type="text" name="lname" required >
</label>
</p>
<p>
<label> Email Address
<input type="password" name="email_address" size="30" >
</label>
</p>
<fieldset>
<legend> Which IT course type do you require? </legend>
<p> <label> <input type="radio" name="course" required value="html"> HMTL5 </label> </p>
<p> <label> <input type="radio" name="course" required value="c#"> C# </label> </p>
<p> <label> <input type="radio" name="course" required value="multimedia"> Multimedia </label> </p>
<p> <label> <input type="radio" name="course" required value="networking"> Networking </label> </p>
</fieldset>
<fieldset>
<legend> Extras </legend>
<p> <label> <input type="checkbox" name="extras" required value=&quoexamples"> Examples </label> </p>
<p> <label> <input type="checkbox" name="extras" required value=&quohw"> Homework Assignments </label> </p>
<p> <label> <input type="checkbox" name="extras" required value=&quoquizzes"> Online Quizzez </label> </p>
</fieldset>
<p> <strong> How did you reach this site?: </strong>
<label>Search engine
<input name = "howtoreach" type = "radio" value = "search engine" checked> </label>
<label>Links from another website
<input name = "howtoreach" type = "radio" value = "link" </label>
<label>Google.com website
<input name = "howtoreach" type = "radio" value = "google.com" </label>
<label>Reference in a online article
<input name = "howtoreach" type = "radio" value = "article" </label>
<label>Other
<input name = "howtoreach" type = "radio" value = "other" </label>
</p>
<p> <label>Rate this site:
<select name="rate"
<option selected> 5 </option>
<option selected> 4 </option>
<option selected> 3 </option>
<option selected> 2 </option>
<option selected> 1 </option>
</select>
</label>
</p>
<p> <label> <Special Instructions: <br>
<textarea name = "comments" rows = "5" cols = "50" > Please enter your feedback here. </textarea >
</label>
</p>
<p> <label> Additionl comments, if any
<textarea name="comments" maxlength="500" > </textarea>
</label>
</p>
<p> <input type = "submit" value = "Submit" >
<input type = "reset" value = "Reset" >
</p>
</form >
</body>
</html>
The rendered internal links example is:


For more details, please contact me here.
Date of last modification: March 26, 2019.