Lab 06 HTML Form
Lab #6:
HTML HTML Forms
HTML HTML Forms
QUESTIONS
1.
Explain about
the HTML code above.
The HTML code above have the elements which is mainly use to make a form in html. I am going to explain these elements one by one.
|
Elements |
Explanation |
|
<form action="/action_page.php"> |
-
This is the
element which is a container for different types of input elements, such as
text files, checkboxes, radio buttons, submit buttons. |
|
<label for="fname"> |
-
This element defines
a label for several elements such as <input type = “text”> |
|
<input type="text" id="fname"
name="fname" value=""> |
-
This element will
display a single line text input field for users to input their data. |
|
<input type="submit" value="Submit"> |
-
This element will
display a submit button for submitting the form. |
|
action_page.php |
-
When user fills
out the form and clicks the submit button, the form data is sent for
processing to a PHP file named “action_page”. |
2.
Write a HTML code to display the output as show as Figure Q2 on the webpage.
Figure Q2
<!DOCTYPE
html>
<html>
<body>
<h2>LAB-06-Q2
HTML Forms</h2>
<form action="/action_page.php">
<label
for="fname">First name:</label><br>
<input
type="text" id="fname" name="fname"
value=""><span>
<label
for="lname">Last name:</label>
<input
type="text" id="lname" name="lname" value="
"><br><br>
<label for="ID">ID:</label>
<input
type= "text" id="ID" name="ID" value= "
"><span>
<label
for= "age"> Age:</label>
<input
type="number" id="age" name="age" value= "
"><br>
<input
type="submit" value="Submit">
</form>
</body>
</html>


Comments
Post a Comment