Creating forms in HTML is an essential part of web development. It allows users to interact with a website by providing input and submitting data. In this blog post, we will cover the basics of creating forms in HTML, including the different form elements and how to use them.
The form element is the container for all the form controls. It is used to create an area where users can input data and submit it to the server. The form element has two attributes: action and method. The action attribute specifies the URL of the file that will process the form data, and the method attribute specifies how the data will be sent to the server (GET or POST).
There are several types of input elements that can be used within a form, including text, radio, checkbox, select, and textarea.
The submit button is used to submit the form data to the server. It is important to note that without a submit button, the form data cannot be sent. The submit input element is used to create the button, and it has an attribute called value which specifies the text that will appear on the button.
Here is the simple program for printing the form element example in html
<html> <head> <title>Tutor Joes</title> </head> <body> <h1>Form Element in HTML</h1> <form> <fieldset> <legend>Registeration Form:</legend> <label for="fname">First name:</label><br> <input type="text" id="fname" name="fname" value="Tutor"><br> <label for="lname">Last name:</label><br> <input type="text" id="lname" name="lname" value="Joe's"><br> <label for="email">Email ID:</label><br> <input type="email" id="email" name="email" value="sample@gamil.com"><br> <label for="mobileNo">Mobile No.:</label><br> <input type="text" id="mobileNo" name="mobileNo" value="9988776655"><br> <label for="address">Address:</label><br> <textarea type="text" name="address" rows="5" cols="23"> Salem </textarea> <input type="submit" value="Submit"> </fieldset> </form> </body> </html>To download raw file Click Here
The code you provided creates an HTML document with a title of "Tutor Joes". The body of the document contains a heading with the text "Form Element in HTML".
Creating forms in HTML is an essential part of web development. Understanding the different form elements and how to use them can help you create more interactive and user-friendly websites. With this guide, you now have the basic knowledge to create forms in HTML and take your web development skills to the next level.
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions