How to use the target blank property in HTML a tag and its function

Source: Internet
Author: User
When making HTML pages, we often use the A tag attribute, as we all know, a tag is used to define a hyperlink. If we are in the process of designing an HTML page, we need to implement the effect of clicking on a text or an element and then opening a page to another page, where a Herf tag attribute is used, and Herf is followed by a link address that you specify to jump to.

a tag syntax is as follows

<a href= "The address you want to jump to" ></a>

Then I wonder if you have noticed that sometimes the Target=_blank attribute is found in the a tag. Some novices may not be very clear about this attribute. Then this article will give you a detailed explanation of the HTML a tag target blank properties of the specific use of the method and role.

Here is an example of a simple HTML code with the target blank property , as follows:

<! DOCTYPE html>

This code can be directly copied and pasted in the local test, the effect such as:

Can find this paragraph text has been added hyperlink, click on the successful jump to the new page, and you can find that he is open a new window, click the previous page and no Impact! So target=_blank This property is meant to open a hyperlink in a new window! Through this property we can more easily view the various jump pages. Will not be bothered by the previous page being overwritten.

If we don't set the target blank property, we'll see that the new link opens in the current window and the previous page disappears.

Here we also want to pay special attention to:

The target blank property must be combined with herf in the a tag to be valid!

So the above is the specific content of the use of the target blank attribute in HTML for the purpose of this article. Hope to have the help of friends who need!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.