VOOZH about

URL: https://www.geeksforgeeks.org/html/html-input-formtarget-attribute/

⇱ HTML <input> formtarget Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML <input> formtarget Attribute

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 <form> element for a specific submit button.

  • Defines where the submitted form response will open.
  • Works with <input type="submit"> and <input type="image">.
  • Overrides the form’s default target attribute for that submission.

Syntax:

<input formtarget="_blank|_self|_parent|_top|framename">

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.
Comment
Article Tags: