- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to specify whether the form-data should be encoded while submitting to the server with HTML?
Use enctype attribute in HTML to set whether the form-data should be encoded while submitting to the server.
Example
You can try to run the following code to implement enctype attribute −
<!DOCTYPE html> <html> <body> <p>Which sports do you like?</p> <form action = "" method = "post" enctype = "multipart/form-data"> <input type = "checkbox" name = "vehicle" value = "football" checked> Football<br> <input type = "checkbox" name = "vehicle" value = "cricket" checked> Cricket<br> <input type = "checkbox" name = "vehicle" value = "hockey"> Hockey<br> <input type = "submit" value = "Submit"> </form> </body> </html>
- Related Articles
- How to specify that the element must be filled out before submitting the form in HTML?
- How to specify that the form should not be validated when disabled in HTML?
- How to specify whether the content of an element should be translated or not in HTML?
- How to specify whether the or the element should have autocomplete enabled in HTML?
- How to specify that the details should be visible to the user in HTML?
- How to specify where to send the form-data when a form is submitted in HTML?
- How to specify the HTTP method to use when sending form-data in HTML?
- How to specify that an element should be pre-selected when the page loads in HTML?
- How to specify that an option should be pre-selected when the page loads in HTML?
- Specify whether the flex items should wrap or not with CSS
- How to specify which form element a calculation is bound to with HTML?
- How to specify the number of columns an element should be divided into with CSS
- How to specify if and how the author thinks the audio/video should be loaded when the page loads in HTML?
- How to specify the number of columns a table cell should span in HTML?
- Set whether or not an element should be visible while not facing the screen with JavaScript?

Advertisements