Account
Login
Categories
HTML
CSS
Python
PHP
MySQL
Linux
Javascript
HTML
CSS
Python
PHP
MySQL
Linux
Javascript
Shobha
The best way to predict the future is to invent it
How does the <form> tag work in HTML?
The
tag is used to create forms on web pages, allowing users to submit input that is then processed by a server. The form contains various input elements like
,
,
, and
that enable users to interact and provide data.Example:
Name:
Submit
action: Specifies the URL or server-side script (such as submit.php) where the form data is sent for processing.
method: Defines how the data is transmitted, either using the GET or POST method
RELATED INTERVIEW QUESTIONS
What is the use of the for attribute in the <label> tag, and how does it enhance form accessibility?
What is the difference between block-level and inline elements in HTML? Provide examples.
How do you create a textarea in HTML? Provide an example.
What is the difference between the id and class attributes in HTML?
What are the differences between inline, block, and inline-block elements in HTML?
What is the difference between the <fieldset> and <div> tags in terms of functionality in forms?
What is the aria-label attribute, and how does it enhance accessibility in HTML forms?
What is the difference between <strong> and <b> tags?
How does the browser handle multiple <style> tags in an HTML document?
What is the use of the defer attribute in the <script> tag?
What is the difference between class and id in HTML for styling?
How do you set a link to open in a specific window in HTML?
How do you link an external CSS file to an HTML document?
Explain the difference between <div> and <section> in HTML5.
How do you add a favicon to your website in HTML?
X