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?

王林
Release: 2023-09-01 22:13:02
forward
626 people have browsed it

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>
Copy after login

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template