Easy Tutorial
❮ Att Input Height Att Li Value ❯

HTML <button> formtarget Attribute

HTML <button> Tag

Example

Two submit buttons, the first one submits data using the default target ("_self"), and the second one submits data to a new window (target="_blank"):


Browser Support

Internet Explorer 10, Firefox, Opera, Chrome, and Safari support the formtarget attribute.

Note: Internet Explorer 9 and earlier versions do not support the formtarget attribute.


Definition and Usage

The formtarget attribute specifies where to display the response after submitting the form. The formtarget attribute overrides the target attribute of the form element.

This attribute is used with type="submit".


Differences Between HTML 4.01 and HTML5

The formtarget attribute is new in HTML5.

Note: HTML5 does not support frames and framesets. Now, the values parent, top, and framename are mostly used for iframes.


Syntax

Attribute Values

Value Description
_blank Submits the form to a document in a new window/tab.
_self Submits the form to a document in the same frame. (Default)
_parent Submits the form to a document in the parent frame.
_top Submits the form to a document in the full window.
framename Submits the form to a document in the specified frame.
❮ Att Input Height Att Li Value ❯