The formtarget attribute is targeted to the <input type="submit"> input fields. This attribute is rarely used, so there will be no questions about it in the exercises - Week 5.
This attribute's value indicates where the response from the form submission should be displayed.
<input type="submit"
formtarget="_blank"
value="Submit but show results in a new window/tab">
Possible values for the formtarget attributes are:
_blank: the response is displayed in a new window or tab
_self: the response is displayed in the same frame (this is default)
_parent: the response is displayed in the parent frame
_top: the response is displayed in the full body of the window
framename: the response is displayed in a named iframe
Source code:
<form action="defaultAction.php">
<label for="givenName">Given name:</label>
<input type="text" name="givenName" id="givenName"><br>
<label for="familyName">Family name:</label>
<input type="text" name="familyName" id="familyName"><br>
<input type="submit" value="Submit as usual">
<input type="submit"
formtarget="_blank"
value="Submit but show results in a new window/tab">
</form>