• Skip to primary navigation
  • Skip to main content

Tech Honey

The #1 Website for Oracle PL/SQL, OA Framework and HTML

  • Home
  • HTML
    • Tags in HTML
    • HTML Attributes
  • OA Framework
    • Item in OAF
    • Regions in OAF
    • General OAF Topics
  • Oracle
    • statement
    • function
    • clause
    • plsql
    • sql
You are here: Home / HTML / Tags / Attributes / HTML Area Tag Target Attribute

HTML Area Tag Target Attribute

August 15, 2013 by techhoneyadmin

In HTML opening link in a new window is very easy and frequently achieved functionality.

In order to open link in a new window we use the target attribute of the HTML area(<area>) tag.

Note: HTML Area Tag Target Attribute is used only if the HTML Area Href Attribute is used.


Syntax of using HTML Area Tag Target Attribute

<area target =”_blank|_self|_parent|_top|frame_name”>

Here in the above syntax the values for the HTML Area target Attribute mean the following:

Value Description
_blank Opens the linked resource/webpage  in a new window or tab
_self Opens the linked resource/webpage  in the same frame as it was clicked (this is default)
_parent Opens the linked resource/webpage  in the parent frame
_top Opens the linked resource/webpage  in the full body of the window
framename Opens the linked resource/webpage  in a named frame

Also note that by default the _self value will be set for the target attribute i.e. if we do not mention the target attribute in the HTML area tag then the linked resource/webpage will open in the same frame in which the link was clicked.


Examples of Using the HTML Area Tag Target Attribute

HTML Open link in a new window:

HTML Area Tag Target Attribute Code Output
<p>Click on the shapes to watch them:</p>
<img src=" HTMLAreaTagEx.gif" alt="Shapes"
usemap="#shapemap" width="145" height="126">
<map name="shapemap">
<area shape="circle" coords="25,30,12" href="Circle.jpg"
type="image/gif" target=_blank>
<area shape="rect" coords="62,30,82,40" href="triangle.jpg"
type="image/gif" target=_blank >
<area shape="circle" coords="115,35,10" href="star.jpg"
type="image/gif" target=_blank >
</map>
Click on the shapes to watch them:Shapes

Here in the above HTML area target attribute example we have mentioned that once the certain portion of the image is clicked the respective image should open in a new browser window or tab by giving target attribute a value of _blank.


HTML Area Target Attribute Supporting Browsers

S. No. Browser Supported(Yes/No)
1 Internet Explorer Yes
2 Firefox Yes
3 Google Chrome Yes
4 Opera Yes
5 Safari Yes

Filed Under: Attributes Tagged With: Html area tag target attribute, Html area target, Html area target attribute, Html area target full view, HTML area target new window, Html area target same frame, Html area target same window, HTML open link in a new window, Html target =_blank, HtmlAreaTagTargetAttribute

Copyright © 2023 · Parallax Pro on Genesis Framework · WordPress · Log in