The target property of a tag

Source: Internet
Author: User

The target property of the <a> tag specifies where to open the linked document.

If a target property is included in a <a> tag, the browser will load and display the document in the frame or window that is named after the href attribute of the tag, which matches the target name. If the frame or window that specifies the name or ID does not exist, the browser opens a new window, gives the window a specified tag, and then loads the new document into that window. From then on, the hyperlinked document can point to this new window.

_blank

The browser always loads the target document in a newly opened, unnamed window.

_self

The value of this target is the default target for all <a> tags that do not have a target specified, which causes the target document to be loaded and displayed in the same frame or window as the source document. This goal is superfluous and unnecessary unless used with the target property in the document title <base> tag.

_parent

This goal causes the document to be loaded into the parent window or the frameset that contains the frame referenced by the hyperlink. If the reference is in a window or in a top-level frame, then it is equivalent to the target _self.

_top

This goal causes the document to be loaded into the window containing the hyperlink, with the _top target clearing all the contained frames and loading the document into the entire browser window.

Tip: All 4 values of these target begin with an underscore. Any other window or target that starts with an underscore will be ignored by the browser, so do not underline the first character of any frame name or ID defined in the document.

The target property of a tag

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.