Home Tutorial Html Html5 HTML5 type attribute, Definition of type attribute in tag.

 
 

HTML5 type attribute, Definition of type attribute in tag.
Posted on: September 1, 2010 at 12:00 AM
Use of type attribute of area tag in HTML5.

HTML5 type attribute, Definition of type attribute in <area> tag.

This tutorial will inform you about <area>tag type attribute. The type attribute is used for defining the MIME (Multipurpose Internet Mail Extensions) type of the linked document. This attribute is used only when the href attribute is set in the <area> tag. This attribute informs the browser about the type of the linked resources.

Declaration syntax:

<area href="URL"   type="value"/>

The value of the type attribute is the name of the MIME type of the document. For Example :- value can be text, video, image, audio etc.

In html5 this is new attribute of <area> tag.

Example_type_attribute.html.

<!DOCTYPE html >
<html>
 <head>
  <title> Example For area Tag  type attribute</title>
 </head>
 <body>
   <img src="comp.gif" width="200" height="159"  usemap="#Map0" />
   <map name="Map0">
   <area href="cpu.bmp" shape="rect" coords="4, 6, 196, 158" type="image/bmp">
  </map><br>
  The MIME type of the linked document is image type.
 </body>
</html>

Output.

Note: See the browser compatible page for successfully rendering the program.

Download This Example

Related Tags for HTML5 type attribute, Definition of type attribute in tag.:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.