HTML <link> Attribute

HTML <link> charset Attribute Example The charset attribute indicates that the linked document is written in Japanese: <link href=”domoarigato.htm” rel=”parent” charset=”ISO-2022-JP”> Definition and Usage The <link> charset attribute is not supported in HTML5. The charset attribute specifies the character encoding of the linked document. The default character-set for modern browsers is ISO-8859-1. Syntax <link charset=”character_set”> Attribute Values Value Description character_set […]

HTML <link> Tag

Example Link to an external style sheet: <head> <link rel=”stylesheet” type=”text/css” href=”theme.css”> </head> Try it Yourself » Definition and Usage The <link> tag defines a link between a document and an external resource. The <link> tag is used to link to external style sheets. Browser Support When used for style sheets, the <link> tag is supported in all […]

HTML <body> link Attribute

Example Set the default link color to “blue” in an HTML document: <html> <body link=”blue”> <p><a href=”https://www.w3schools.com”>W3Schools.com</a></p> <p><a href=”https://www.w3schools.com/html/”>HTML Tutorial</a></p> </body> </html> Try it Yourself » Definition and Usage The link attribute specifies the default color of unvisited links in a document. Browser Support Attribute link Yes Yes Yes Yes Yes Compatibility Notes The <body> link attribute is […]

HTML <base> href Attribute

Example Specify a base URL for all relative URLs on a page: <head> <base href=”https://www.schools.com/images/”> </head> Try it Yourself » Definition and Usage The href attribute specifies the base URL for all relative URLs on a page. Browser Support Attribute href Yes Yes Yes Yes Yes Syntax <base href=”URL“> Attribute Values Value Description URL An absolute […]

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> 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 <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 <a> charset Attribute

Example Use of the charset attribute in a link: <a charset=”UTF-8″ href=”https://dwfaisalabad.com”>www.dwfaisalabad.com</a> Try it Yourself » Definition and Usage The <a> charset attribute is not supported in HTML5. The charset attribute specifies the character-set of the linked document (the document referenced in the href attribute). Syntax <a charset=”value”> Attribute Values Value Description character_set The character-set of the […]

HTML <a> Tag

Example A link to W3Schools.com: <a href=”https://dwfaisalabad.com”>Visit DW Fsd</a> Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The <a> tag defines a hyperlink, which is used to link from one page to another. The most important attribute of the <a> element is the href attribute, which indicates the link’s destination. […]

HTML <!–…–> Tag

Example An HTML comment: <!–This is a comment. Comments are not displayed in the browser–> <p>This is a paragraph.</p> Try it Yourself » Definition and Usage The comment tag is used to insert comments in the source code. Comments are not displayed in the browsers. You can use comments to explain your code, which can […]