New in HTML5.

<input formtarget="">

Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
Attribute of
How To Use Input To Create Form Fields In HTML: Easy Tutorial
What does <input formtarget=""> do?
Specifies the browsing context in which to open the response from the server after form submission. For use only on input types of "submit" or "image".

Using formtarget

The formtarget attribute specifies the browsing context in which to open the response from the server after form submission. The target contexts are the same options as for the target attribute on the anchor (<a>) element, and they work the same way. The target browsing context for a form response can also be specified in the target attribute of the <form> element. The formtarget specified on the submission button or submission image button will override the target attribute specified on the <form> element. Unless you want to provide multiple form submission inputs, and give the user the ability to select between different target browsing contexts, it is probably best to simply specify the target on the <form> element.

Adam is a technical writer who specializes in developer documentation and tutorials.

Browser Support for formtarget

iefirefoxchromeedgesafariopera
11434513934