HTML Attributes
HTML formtarget attribute
Overrides the target browsing context for the submission initiated by this control. Applicable elements include: <button>, <input>. Check each element’s value rules. Example uses illustrative URLs or local assets; provide the corresponding files or application endpoints when running it.
Formal Syntax & Structure
html syntaxhtml
formtarget="_blank"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| formtarget | browsing context name or keyword | Overrides the target browsing context for the submission initiated by this control. |
Working Example
Example Snippethtml
<form action="/preview"> <button formtarget="_blank">Preview in new tab</button></form>Browser Compatibility
Minimum supported versions across modern rendering engines
Blink (modern)
Chrome
9
Yes
EdgeHTML / Blink
Edge
12
Yes
Gecko
Firefox
4
Yes
WebKit
Safari
5
Yes
Presto / Blink
Opera
≤12.1
Yes
Desktop support for formtarget on input only; other elements, input types, individual values and mobile behavior may differ.
HTML Living Standard