Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML form target Attribute

HTML
target property

HTML form Tag Reference HTML Tag

Example

Submit a form that opens in a new window or a new tab, that is, display the received response in a new window or new tab:

  First name:

  Last name:

 

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the target attribute.


Definition and Usage

The target attribute specifies a name or a keyword indicating where to open the action URL, that is, where to display the response received after the form is submitted.

The target attribute defines the name or keyword of a browsing context (such as a tab, window, or inline frame).


Differences between HTML 4.01 and HTML5

HTML5 supports the target attribute.

In HTML 4.01, the target attribute is deprecated.

**Note:** In HTML5, frame and frameset are no longer supported, so the values _parent, _top, and framename are mostly used with iframe.


Syntax

HTML tag