HTML5: How to specify the form-data when a form is submitted?
Solution :
HTML Code:
Explanation:
- This HTML code demonstrates a form with an action attribute.
- The action attribute specifies the URL to which the form data will be submitted upon submission.
- In this case, the form data will be submitted to "https://www.w3resource.com/html-css-exercise/basic/solution/form-action-answer-demo.php".
- The method attribute specifies the HTTP method used to submit the form, in this case, POST.
- Inside the form element, there are input fields for entering user ID and user name information.
- Each input field has a name attribute corresponding to the data it represents.
- There is a submit button for submitting the form.
Live Demo:
See the solution in the browser
Supported browser
Yes | Yes | Yes | Yes | Yes |
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics