Update attribute target to open link in new tab (#25765)

* Update attribute target to open link in new tab

* fix: made header
This commit is contained in:
Setyo Adi Wibowo
2018-12-13 08:39:24 +07:00
committed by Randell Dawson
parent c14653a86c
commit 3c77c4dde2

View File

@ -32,6 +32,16 @@ Links don't need to only be text. You can add a link to an image as well!
What we do here is we put an <img> tag inside of an <a> tag. This allows us to click the image to go to the link, which is `https://www.freecodecamp.org`. Double neato! What we do here is we put an <img> tag inside of an <a> tag. This allows us to click the image to go to the link, which is `https://www.freecodecamp.org`. Double neato!
## Using Target Attribute
The target attribute specifies where to open the linked document."_blank" on target attribute mean opens the linked document in a new window or tab. This example will open the linked document in a new browser window/tab.
Example
```html
<a href="https://www.freecodecamp.org/" target="_blank">Visit our site for tutorials</a>
```
#### More Information: #### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article --> <!-- Please add any articles you think might be helpful to read before writing the article -->
* [MDN - HTML <a> Reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) * [MDN - HTML <a> Reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a)