Account
Login
Categories
HTML
CSS
Python
PHP
MySQL
Linux
HTML
CSS
Python
PHP
MySQL
Linux
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
How can you use HTML5s <output> tag to show calculated values on a webpage?
How can you make a page layout responsive using HTML and media queries?
What is the significance of the method=post in HTML forms, and how does it differ from method=get?
What is the async and defer attribute in the <script> tag? How do they impact the way scripts are executed in HTML documents?
Can you explain the difference between the target=_blank and target=_self attributes in anchor (<a>) tags?
How do you define custom data attributes in HTML, and how can they be used in JavaScript?
How do you create a list of hyperlinks in HTML?
What is the <footer> tag used for in HTML5?
What are the benefits of using the async attribute in script tags for faster page loading?
How can you use HTML5’s input types to implement a file upload form?
What is the purpose of using autofocus in form elements, and how does it work in HTML5?
Explain the difference between <thead>, <tbody>, and <tfoot> in table structure.
How does the required attribute in HTML5 help with client-side form validation?
What is the purpose of the <noscript> tag in HTML?
How do you define the title of an HTML page?
X