Curriculum
Course: HTML Basic
Login

Curriculum

HTML Basic

HTML Introduction

0/1

HTML Editors

0/1

HTML Attributes

0/1

HTML Paragraphs

0/1

HTML Formatting

0/1

HTML Comments

0/1

HTML Favicon

0/1

HTML Page Title

0/1

HTML Iframes

0/1

HTML Java Script

0/1

HTML File Paths

0/1

HTML Symbols

0/1
Text lesson

The formenctype Attribute

The “formenctype” attribute of the input element determines the encoding method for form data upon submission, applicable only for forms using the “post” method.

It’s essential to note that this attribute takes precedence over the “enctype” attribute of the <form> element.

The “formenctype” attribute is compatible with the following input types: submit and image.

Example

A form featuring two submit buttons: one sends form-data using the default encoding, while the other sends the form-data encoded as “multipart/form-data”.

<form action=”/action_page_binary.asp” method=”post”>
  <label for=”fname”>First name:</label>
  <input type=”text” id=”fname” name=”fname”><br><br>
  <input type=”submit” value=”Submit”>
  <input type=”submit” formenctype=”multipart/form-data”
  value=”Submit as Multipart/form-data”
>

</form>