Open In App

HTML | <area> type Attribute

Last Updated : 06 Jun, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

The <area> type attribute is used to specify the Internet media type of the linked document. It is used only when href attribute is set.
Syntax: 
 

<area type="media_type">

Note: This attribute is not supported in HTML5.

Attribute Values: It contains single value media_type which is used to specify the Internet media type of the embedded file.
Example: 
 

html




<!DOCTYPE html>
<html>
 
<head>
    <title>
        HTML area type Attribute
    </title>
</head>
 
<body style="text-align:center;">
    <img src=
        alt="" width="300" height="119" class="aligncenter"
        usemap="#shapemap" />
 
    <map name="shapemap">
         
        <!-- area tag contained image. -->
        <area shape="poly"
            coords="59, 31, 28, 83, 91, 83"
            alt="Triangle" type="image/png">
         
        <area shape="circle"
            coords="155, 56, 26"
            alt="Circle" type="image/png">
         
        <area shape="rect"
            coords="224, 30, 276, 82"
            alt="Square" type="image/png">
    </map>
</body>
 
</html>                   


Output: 
 

  • Before click on specific clickable area: 
     

alt_attribute

  • After click on specific clickable area: 
     

alt_attribute

Supported Browsers: The browser supported by HTML <area> type attribute are listed below: 
 

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Safari
  • Opera

 



Similar Reads

HTML | &lt;area&gt; target Attribute
The HTML &lt;area&gt; target Attribute is used to specify where to open the linked document. It works only when href attribute is present in the area elements. Syntax: &lt;area target="_blank|_self|_parent|_top|framename"&gt; Attribute Values: _blank: It opens the link in a new window._self: It is the default value. It opens the linked document in
1 min read
HTML | &lt;area&gt; download Attribute
The &lt;area&gt; download attribute is used to download the target content when user clicks on the hyperlink. It is used only when the href attribute is set. The name of the downloaded file will be the value of the attribute. The browser automatically detects the correct file extension and add it to the file. If the value is deleted, then the origi
1 min read
HTML | &lt;area&gt; alt Attribute
The &lt;area&gt; alt attribute is used to specify the alternative text for an image when the image attribute is not displayed. It gives alternative information for the user when the image is not loaded to display.Syntax: &lt;area alt="text"&gt; Attribute Values: It contains single value text which is used to specify the alternative text for area, i
1 min read
HTML | &lt;area&gt; href Attribute
The &lt;area&gt; href attribute is used to specify the URL of the target page. When the href attribute is not present in the &lt;area&gt; an element that it will not be a hyperlink. Syntax: &lt;area href="URL"&gt; Attribute Value: absolute URL: It points to another website.relative URL: It points to a file within a website.anchor URL: It points to
1 min read
HTML | &lt;area&gt; coords Attribute
The &lt;area&gt; coords attribute is used to specify the coordinate of an area in an image-map. It is used with shape attribute to specify the size, shape, and placement of an area. (0, 0) is the coordinate of the top-left corner.Syntax: &lt;area coords="value"&gt; Attribute Values: x1, y1, x2, y2: It specifies the coordinate of top-left (x1, y1) a
2 min read
HTML | &lt;area&gt; rel Attribute
The &lt;area&gt; rel attribute is used to specify the relationship between the current and the linked document. It is used only when href attribute present. Syntax: &lt;area rel="value"&gt; Attribute Values: alternate: It defines an alternate version of the document i.e. print page, translated or mirror.author: It defines the author of the document
2 min read
HTML | &lt;area&gt; shape Attribute
The HTML area shape Attribute is used with the coords attribute to describe the size, shape, and placement of a &lt;area&gt; element. Syntax: &lt;area shape="default | rect | circle | poly"&gt; Attribute Values: default: It is used to specify the entire region.rect: It is used to specify the rectangular region.circle: It is used to specify a circul
1 min read
HTML | &lt;area&gt; media Attribute
The HTML area media attribute is used to specify the media or device the target URL is optimized for. this attribute specify the style is for specific devices like print media or speech. This attribute can accept several values. Only used if the href attribute is present. This attribute is purely advisory.Syntax: &lt;area media="value"&gt; Possible
2 min read
HTML &lt;area&gt; referrerpolicy Attribute
The HTML &lt;area&gt; referrerpolicy Attribute is used to specify the reference information on the client side that will be sent to the server when fetching out the result. Syntax: &lt;area referrerpolicy="value"&gt; Attribute Values: no-referrer: It specifies that no reference information will be sent along with a request.no-referrer-when-downgrad
2 min read
HTML &lt;area&gt; hreflang Attribute
HTML &lt;area&gt; hreflang attribute is used to specify the language of the target URL in the given area. It is used only when the href attribute is set. Syntax:  &lt;area hreflang="language_code"&gt;Attribute Values: Value Description language_code which is the two-letter language code and used to specify the language of the linked document.  Note
1 min read