HTML Forms

 

<!DOCTYPE html>

<html>

<body>

 

<h2>LAB-06 HTML Forms</h2>

 

<form action="/action_page.php">

<label for="fname">First name:</label><br>

<input type="text" id="fname" name="fname" value=""><br>

<label for="lname">Last name:</label><br>

<input type="text" id="lname" name="lname" value=" "><br><br>

<input type="submit" value="Submit">

</form>

 

<p>If you click the "submit" button, the form-data will be sent to a page called "/action_page.php".</p>

 

</body>

</html>

Output:

Question 1

<!DOCTYPE html> It is used to tell the browser what kind of document to display, in this case html. It is used for all HTML documents.

<html> The main language of the document. Is used to build the content which the browser reads. All web pages have the tag.

<body> It defines the body of the document.

<p> It represents paragraph.

<h1> to <h6> it defines the headings of the document.

<br> it defines line break.

<form> it creates a form in HTML,

Question 2

<!DOCTYPE html>

<html>

<body>

 

<h2>LAB-06 HTML Forms</h2>

 

<form action="/action_page.php">

<label for="fname">First name:</label>

<input type="text" id="fname" name="fname" value="">

<label for="lname">Last name:</label>

<input type="text" id="lname" name="lname" value=" "><br><br>

<label for="id">ID:</label>

<input type="number" id="id" name="id" value=" ">

<label for="age">AGE:</label>

<input type="number" id="age" name="age" value=" "><br><br>

<input type="submit" value="Submit">

</form>


<p>If you click the "submit" button, the form-data will be sent to a page called "/action_page.php".</p>

 

</body>

</html>

Comments

Popular posts from this blog

My Page 2

TCP//IP

Internal and External CSS