Horje
How to create HTML Links The target Attribute | HTML Links Code
How to create HTML Links The target Attribute

By default, the linked page will be displayed in the current browser window. To change this, you must specify another target for the link.

The target attribute specifies where to open the linked document.

The target attribute can have one of the following values:

  • _self - Default. Opens the document in the same window/tab as it was clicked
  • _blank - Opens the document in a new window or tab
  • _parent - Opens the document in the parent frame
  • _top - Opens the document in the full body of the window

Full Example of HTML Links The target Attribute

Use target="_blank" to open the linked document in a new browser window or tab:
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h2>The target Attribute</h2>

<a href="https://itupto.com/" target="_blank">Visit Itupto!</a> 

<p>If target="_blank", the link will open in a new browser window or tab.</p>

</body>
</html>

Output should be:

Full Example of HTML Links The target Attribute



Read Full::
HTML Links Code
Category:
HTML Code
Sub Category:
HTML Links Code
Uploaded:
7 months ago
Uploaded by:
Admin
Views:
1

Related Articles
What is HTML Links HTML Links Code
How to create HTML Links - Syntax HTML Links Code
How to create HTML Links The target Attribute HTML Links Code
What is Absolute URLs vs. Relative URLs HTML Links Code
How to use an Image as a Link HTML Links Code
How to use Link to an Email Address HTML Links Code
How to create Button as a Link HTML Links Code
How to use a title in Link HTML Links Code

Single Articles
Full Example of HTML Links The target Attribute

Share on: