HTML <input> formtarget Attribute (original) (raw)
Last Updated : 25 May, 2026
The formtarget attribute is used to specify where the response should be displayed after submitting a form. It overrides the target attribute of the
element for a specific submit button.- Defines where the submitted form response will open.
- Works with and .
- Overrides the form’s default target attribute for that submission.
**Syntax:
**Attribute Values:
- **_blank: The input response is display in a new window.
- **_self: The input response is display in the same frame. it is the default value.
- **_parent: The input response is display in the parent frameset.
- **_top: The input response is display in the full body of the window.
- **framename: The input response is display in the named frame. html `
GeeksforGeeks
<h2>
HTML <input> formtarget Attribute
</h2>
<form action="#">
Username:
<input type="text" name="username">
<br><br>
Password:
<input type="text" name="password">
<br><br>
<input type="submit" value="Submit" formtarget="_blank">
</form>
</center>
`