HTML <a> media Attribute

Example A link with a media attribute: <a href=”https://dwfaisalabad.com?output=print” media=”print and (resolution:300dpi)”> Open media attribute page for print.</a> Try it Yourself » Definition and Usage The media attribute specifies what media/device the linked document is optimized for. This attribute is used to specify that the target URL is designed for special devices (like iPhone) , speech […]

HTML <a> hreflang Attribute

Example The hreflang attribute specifies the language of the document in the link: <a hreflang=”en” href=”https://dwfaisalabad.com”>dwfaisalabad.com</a> Try it Yourself » Definition and Usage The hreflang attribute specifies the language of the linked document. This attribute is only used if the href attribute is set. Note: This attribute is purely advisory. Differences Between HTML 4.01 and HTML5 […]

HTML <a> href Attribute

Example The href attribute specifies the link’s destination: <a href=”https://dwfaisalabad.com”>Visit DW Fsd</a> Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The href attribute specifies the URL of the page the link goes to. If the href attribute is not present, the <a> tag is not a hyperlink. Syntax <a href=”URL“> […]

HTML <a> download Attribute

Example Download file when clicking on the link (instead of navigating to the file): <a href=”https://dwfaisalabad.com/wp-content/uploads/2017/11/wordpress49-180×180.png” download> 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 the href attribute is […]

HTML <a> coords Attribute

Example Use of the shape and coords attribute in an <a> element, to create an image-map: <object data=”planets.gif” alt=”Planets” type=”image/gif” usemap=”#Map1″> <map name=”Map1″> <a href=”sun.htm” shape=”rect” coords=”0,0,82,126″>The Sun</a> <a href=”mercur.htm”shape=”circle” coords=”90,58,3″>Mercury</a> <a href=”venus.htm” shape=”circle” coords=”124,58,8″>Venus</a> </map> </object> Try it Yourself » Definition and Usage The <a> coords attribute is not supported in HTML5. The coords attribute is used together with the shape attribute to specify the size, shape, and placement […]

HTML The class Attribute

Using The class Attribute The class attribute specifies one or more class names for an HTML element. The class name can be used by CSS and JavaScript to perform certain tasks for elements with the specified class name. In CSS, to select elements with a specific class, write a period (.) character, followed by the name of […]

HTML The id Attribute

Using The id Attribute The id attribute specifies a unique id for an HTML element (the value must be unique within the HTML document). The id value can be used by CSS and JavaScript to perform certain tasks for a unique element with the specified id value. In CSS, to select an element with a specific id, […]