Home >Web Front-end >HTML Tutorial >How do we specify in HTML the target location for opening a linked document?

How do we specify in HTML the target location for opening a linked document?

王林
王林forward
2023-09-01 22:13:02661browse

How do we specify in HTML the target location for opening a linked document?

Use the target attribute to specify the target for opening the linked document in HTML. The following are the values ​​of the target properties -

parent

Properties

Description

_blank

Open the linked page in a new tab.

self

Opens the linked page in the current tab.

Open the linked page in the parent frame.

Top

Open the linked page in the top frame.

Example

You can try running the following code to achieve the targetProperties-

<!DOCTYPE html>
<html>
   <head>
      <title>HTML target attribute</title>
   </head>
   <body>
      <h2>References</h2>
      <p>Refer the following <a href = "https://www.qries.com/questions.php" target = "_blank">website</a>.<br>
         The above link will open in a new tab.</p>
   </body>
</html>

The above is the detailed content of How do we specify in HTML the target location for opening a linked document?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete