Files
freeCodeCamp/mock-guide/english/html/attributes/a-target-attribute/index.md
Stuart Taylor 7da04a348b fix: Update packages and fix local dev (#26907)
<!-- Please follow this checklist and put an x in each of the boxes, like this: [x]. It will ensure that our team takes your pull request seriously. -->

- [x] I have read [freeCodeCamp's contribution guidelines](https://github.com/freeCodeCamp/freeCodeCamp/blob/master/CONTRIBUTING.md).
- [x] My pull request has a descriptive title (not a vague title like `Update index.md`)
- [x] My pull request targets the `master` branch of freeCodeCamp.
2018-10-23 18:48:46 +05:30

1.4 KiB

title
title
A Target Attribute

A Target Attribute

The <a target> attribute specifies where to open the linked document in an a (anchor) tag.

Examples:

A target attribute with the value of “_blank” opens the linked document in a new window or tab.

	<a href="https://www.freecodecamp.org" target="_blank">freeCodeCamp</a>

A target attribute with the value of “_self” opens the linked document in the same frame as it was clicked (this is the default and usually does not need to be specified).

	<a href="https://www.freecodecamp.org" target="_self">freeCodeCamp</a>
	<a href="https://www.freecodecamp.org">freeCodeCamp</a>

A target attribute with the value of “_parent” opens the linked document in the parent frame.

	<a href="https://www.freecodecamp.org" target="_parent">freeCodeCamp</a>

A target attribute with the value of “_top” opens the linked document in the full body of the window.

	<a href="https://www.freecodecamp.org" target="_top">freeCodeCamp</a>

A target attribute with the value of "framename" Opens the linked document in a specified named frame.

	<a href="https://www.freecodecamp.org" target="framename">freeCodeCamp</a>

More Information:

Target Attribute: w3schools