Date First Published: 19th December 2022
Topic: Web Design & Development
Subtopic: Web Development
Article Type: Computer Terms & Definitions
Difficulty: MediumDifficulty Level: 6/10
Learn more about what the HTML <a> target attribute is in this article.
The HTML <a> target attribute is used to specify where to open the linked page. If no target is specified, the link will open in the same frame. This attribute can contain five possible values, which are listed below.
Value | Description |
---|---|
_blank | Opens the link in a new tab. |
_self | Opens the link in the same frame (default) |
_parent | Opens the link in the parent frame (deprecated in HTML5) |
_top | Opens the link in the top-most frame (deprecated in HTML5) |
framename | Opens the link in the named frame (deprecated in HTML5) |
Even though there are five possible values, the only relevant one is _blank. The other values were used to specify frames (the ability to place one document inside another), which were deprecated in HTML5. Frames were deprecated in HTML5 because they create usability and accessibility issues, such as difficulty printing and bookmarking pages, and difficulty for screen readers and other assistive technologies to understand them. The ability to create frames still exists, but they are now considered obsolete by the W3C.
The link can be clicked on below. It will open in a new tab.
With the _blank value, links will open in a separate tab, allowing a user to click on it without leaving the age they are visiting. This can help keep visitors on a site for longer and it is recommended to add this attribute when adding external links to a website.
Some people believe that users do not prefer to open links in a new tab as they think that they are similar to popup ads that unexpectedly open in a new tab. However, most users prefer to open links in a new tab because it allows them to read pages later without being taken off the page they are currently browsing.
If so, it is important that you tell me as soon as possible on this page.
Network Services Network Setups Network Standards Network Hardware Network Identifiers Network Software Internet Protocols Internet Organisations Data Transmission Technologies Web Development Web Design Web Advertising Web Applications Web Organisations Web Technologies Web Services SEO Threats To Systems, Data & Information Security Mechanisms & Technologies Computer Hardware Computer Software Ethics & Sustainability Legislation & User Data Protection