Home  >  Q&A  >  body text

What is the difference between enctype and formenctype in HTML5?

I'm just wondering what's the difference between the attributes enctype and formenctype in HTML Living Standard (aka the new HTML5 specification)? I've been reading the HTML Standard for Developers and still can't seem to see any real difference between the two.

P粉190883225P粉190883225180 days ago285

reply all(1)I'll reply

  • P粉488464731

    P粉4884647312024-04-03 10:40:29

    The

    enctype attribute appears on the <form> element and sets the default encoding type for that form.

    The

    formenctype attribute appears on submit buttons (such as the <button> element) and overrides the form's encoding when the submit button is used to trigger form submission.

    reply
    0
  • Cancelreply