HTML <area> rel Attribute

Example An image-map, with a clickable area: <img src=”planets.gif” width=”145″ height=”126″ alt=”Planets” usemap=”#planetmap”> <map name=”planetmap”> <area shape=”rect” coords=”0,0,82,126″ alt=”Sun” href=”sun.htm” rel=”alternate”> </map> Try it Yourself » Definition and Usage The rel attribute specifies the relationship between the current document and the linked document. Only used if the href attribute is present. Browser Support Attribute rel Yes Yes Yes Yes Yes Differences Between HTML 4.01 and […]

HTML <area> nohref Attribute

Example An image-map, with clickable areas, and a nohref attribute: <img src=”planets.gif” width=”145″ height=”126″ alt=”Planets” usemap=”#planetmap”> <map name=”planetmap”> <area shape=”rect” coords=”0,0,82,126″ nohref alt=”Sun”> <area shape=”circle” coords=”90,58,3″ href=”mercur.htm” alt=”Mercury”> <area shape=”circle” coords=”124,58,8″ href=”venus.htm” alt=”Venus”> </map> Try it Yourself » Definition and Usage The <area> nohref attribute is not supported in HTML5. The nohref attribute is a boolean attribute. When present, it specifies that an area has no associated link. Tip: The nohref attribute […]

HTML <area> media Attribute

Example An image-map, with a clickable area: <img src=”planets.gif” width=”145″ height=”126″ alt=”Planets” usemap=”#planetmap”> <map name=”planetmap”> <area shape=”rect” coords=”0,0,82,126″ alt=”Sun” href=”sun.htm” media=”screen and (min-color-index:256)”> </map> Try it Yourself » Definition and Usage The media attribute specifies what media/device the target URL is optimized for. This attribute is used to specify that the URL is designed for special devices (like iPhone) , speech or print media. This […]

HTML <area> hreflang Attribute

In this article we will learn <area> hreflang attribute. Example An image-map, with clickable areas: <img src=”planets.gif” width=”145″ height=”126″ alt=”Planets” usemap=”#planetmap”> <map name=”planetmap”> <area shape=”rect” coords=”0,0,82,126″ alt=”Sun” href=”sun.htm” hreflang=”en”> </map> Try it Yourself » Definition and Usage This <area> attribute specifies the language of the target URL in the area. This attribute is only used if the href attribute is set. Note: This attribute is purely advisory. […]

HTML <area> href Attribute

Example An image-map, with clickable areas: <img src=”planets.gif” width=”145″ height=”126″ alt=”Planets” usemap=”#planetmap”> <map name=”planetmap”> <area shape=”rect” coords=”0,0,82,126″ href=”sun.htm” alt=”Sun”> <area shape=”circle” coords=”90,58,3″ href=”mercur.htm” alt=”Mercury”> <area shape=”circle” coords=”124,58,8″ href=”venus.htm” alt=”Venus”> </map> Try it Yourself » Definition and Usage The href attribute specifies the hyperlink target for the area. If the href attribute is not present, the <area> tag is not a hyperlink. Differences Between HTML 4.01 and HTML5 In HTML5, if the <area> […]

HTML <area> download Attribute

Example An image-map with clickable areas that will be downloaded when clicked on: <img src=”planets.gif” width=”145″ height=”126″ alt=”Planets” usemap=”#planetmap”> <map name=”planetmap”> <area shape=”rect” coords=”0,0,82,126″ alt=”Sun” href=”info_about_the_sun.htm”download=”sun”> <area shape=”circle” coords=”90,58,3″ alt=”Mercury” href=”merglobe.gif”download=”mercury”> <area shape=”circle” coords=”124,58,8″ alt=”Venus”href=”information_about_the_planet_venus.txt” download=”venus”> </map> Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The download attribute specifies that the target will be downloaded when a user clicks on the hyperlink. This attribute is only used if […]

HTML <area> shape Attribute

Example An image-map, with clickable areas: <img src =”planets.gif” width=”145″ height=”126″ alt=”Planets” usemap=”#planetmap”> <map name=”planetmap”> <area shape=”rect” coords=”0,0,82,126″ href=”sun.htm” alt=”Sun”> <area shape=”circle” coords=”90,58,3″ href=”mercur.htm” alt=”Mercury”> <area shape=”circle” coords=”124,58,8″ href=”venus.htm” alt=”Venus”> </map> Try it Yourself » Definition and Usage The shape attribute specifies the shape of an area. The shape attribute is used together with the coords attribute to specify the size, shape, and placement of an area. Browser Support Attribute shape Yes Yes Yes Yes […]

HTML <area>  coords Attribute

Example An image-map, with clickable areas: <img src =”planets.gif” width=”145″ height=”126″ alt=”Planets” usemap=”#planetmap”> <map name=”planetmap”> <area shape=”rect” coords=”0,0,82,126″ href=”sun.htm” alt=”Sun”> <area shape=”circle” coords=”90,58,3″ href=”mercur.htm” alt=”Mercury”> <area shape=”circle” coords=”124,58,8″ href=”venus.htm” alt=”Venus”> </map> Try it Yourself » Definition and Usage The coords attribute specifies the coordinates of an area in an image-map. The coords attribute is used together with the shape attribute to specify the size, shape, and placement of an area. Tip: The coordinates of the top-left […]

HTML <area> alt Attribute

Example An image-map, with clickable areas: <img src=”planets.gif” width=”145″ height=”126″ alt=”Planets” usemap=”#planetmap”><map name=”planetmap”> <area shape=”rect” coords=”0,0,82,126″ href=”sun.htm” alt=”Sun”> <area shape=”circle” coords=”90,58,3″ href=”mercur.htm” alt=”Mercury”> <area shape=”circle” coords=”124,58,8″ href=”venus.htm” alt=”Venus”> </map> Try it Yourself » Definition and Usage The alt attribute specifies an alternate text for an area, if the image cannot be displayed. The alt attribute provides alternative information for an image if a user for some reason cannot view it (because of […]

HTML <map> Tag

Example An image-map, with clickable areas: <img src=”planets.gif” width=”145″ height=”126″ alt=”Planets” usemap=”#planetmap”> <map name=”planetmap”> <area shape=”rect” coords=”0,0,82,126″ href=”sun.htm” alt=”Sun”> <area shape=”circle” coords=”90,58,3″ href=”mercur.htm” alt=”Mercury”> <area shape=”circle” coords=”124,58,8″ href=”venus.htm” alt=”Venus”> </map> Try it Yourself » Definition and Usage The <map> tag is used to define a client-side image-map. An image-map is an image with clickable areas. The required name attribute of the <map> element is associated with the <img>’s usemap attribute and creates a […]

HTML <img> Tag

Example How to insert an image: <img src=”smiley.gif” alt=”Smiley face” height=”82″ width=”82″> Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The <img> tag defines an image in an HTML page. The <img> tag has two required attributes: src and alt. Note: Images are not technically inserted into an HTML page, images are linked to HTML […]

HTML <object> Tag

Example How to use the <object> element to embed a Flash file: <object width=”400″ height=”400″ data=”DW.swf”></object> Try it Yourself » Definition and Usage The <object> tag defines an embedded object within an HTML document. Use this element to embed multimedia (like audio, video, Java applets, ActiveX, PDF, and Flash) in your web pages. You can also use the […]

HTML <embed> Tag

Example An embedded flash animation: <embed src=”helloworld.swf”> Try it Yourself » Definition and Usage The <embed> tag defines a container for an external application or interactive content (a plug-in). Browser Support Element <embed> Yes Yes Yes Yes Yes Differences Between HTML 4.01 and HTML5 The <embed> tag is new in HTML5. Note: Many web browsers have supported […]

HTML <applet> Tag

Not Supported in HTML5 Example An embedded Java applet: <applet code=”Bubbles.class” width=”350″ height=”350″> Java applet that draws animated bubbles. </applet> Definition and Usage The <applet> tag is not supported in HTML5. Use <embed> or <object> instead. The <applet> tag defines an embedded applet. Differences Between HTML 4.01 and HTML5 The <applet> tag is not supported in HTML5. Required Attributes Attribute Value Description […]

HTML <address> Tag

Example Contact information for Example.com: <address> Written by <a href=”mailto:webmaster@example.com”>Jon Doe</a>.<br> Visit us at:<br> Example.com<br> Box 564, Disneyland<br> USA </address> Try it Yourself » Definition and Usage The <address> tag defines the contact information for the author/owner of a document or an article. If the <address> element is inside the <body> element, it represents contact information for […]

HTML <footer> Tag

Example A footer section in a document: <footer> <p>Posted by: Hege Refsnes</p> <p>Contact information: <a href=”mailto:someone@example.com”> someone@example.com</a>.</p> </footer> Try it Yourself » Definition and Usage The <footer> tag defines a footer for a document or section. A <footer> element should contain information about its containing element. A <footer> element typically contains: authorship information copyright information contact information […]

HTML <abbr> Tag

Example An abbreviation is marked up as follows: The <abbr title=”World Health Organization”>WHO</abbr> was founded in 1948. Try it Yourself » Definition and Usage The <abbr> tag defines an abbreviation or an acronym, like “Mr.”, “Dec.”, “ASAP”, “ATM”. Tip: An abbreviation and an acronym are both shortened versions of something else. Both are often represented as a series of […]

HTML Tutorials

With HTML you can create your own Website. This tutorial teaches you everything about HTML. HTML is easy to learn – You will enjoy it.

HTML Form

This section will teach you the basics of HTML forms in detail. HTML Forms HTML Forms HTML Form Elements HTML Input Types HTML Input Attributes

HTML <area> Tag

Example An image-map, with clickable areas: <img src=”planets.gif” width=”145″ height=”126″ alt=”Planets” usemap=”#planetmap”><map name=”planetmap”> <area shape=”rect” coords=”0,0,82,126″ href=”sun.htm” alt=”Sun”> <area shape=”circle” coords=”90,58,3″ href=”mercur.htm” alt=”Mercury”> <area shape=”circle” coords=”124,58,8″ href=”venus.htm” alt=”Venus”> </map> Try it Yourself » Definition and Usage The <area> tag defines an area inside an image-map (an image-map is an image with clickable areas). The <area> element is always nested inside a <map> tag. Note: The usemap attribute in the <img> tag is associated with the <map> element’s […]