HTML <video> src Attribute

Example Play a video: <video src=”movie.ogg” controls> Your browser does not support the video tag. </video> Try it Yourself » Definition and Usage The src attribute specifies the location (URL) of the video file. The example above uses an Ogg file, and will work in Firefox, Opera and Chrome. To play the video in Internet Explorer and […]

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

Example When the user clicks on the w3schools.com/html link, notify w3schools.com/trackpings: <a href=”https://dwfaisalabad.com/” ping=”https://dwfaisalabad.com/trackpings”> Definition and Usage The ping attribute specifies a list of URLs to be notified if the user follows the hyperlink. When the user clicks on the hyperlink, the ping attribute will send a short HTTP POST request to the specified URL. This attribute […]

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 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, […]