Use the data attribute in HTML to specify the URL of the resource to be used by the object in HTML.ExampleYou can try to run the following code to implement the data attribute − Demonstration
Use the controls attribute in HTML to include audio/ video controls in HTML.ExampleYou can try to run the following code to implement the controls attribute − HTML video Tag Online Compiler This browser doesn't support video tag.
Use the content attribute in HTML to get the value associated with http-equiv or name attribute.ExampleYou can try to run the following code to implement the content attribute − This is demo text.
Use the onsearch attribute in HTML to execute a script when the user writes in a search field and press ENTER or x.ExampleYou can try to run the following code to implement the onsearch attribute − Search something and press ENTER. Note: It won' work in Internet Explorer and Firefox. function display() { var a = document.getElementById("inputID"); document.getElementById("test").innerHTML = "Searched for - " + a.value; }
When an element is scrolled, the onscroll attribute triggers. You can try to run the following code to implement onscroll attribute −Example #myid { width : 250px; height : 80px; border : 2px solid blue; overflow: scroll; } Scroll the box. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. function display() { document.getElementById("myid").style.color = "blue"; }
When a form is reset, the onreset attribute triggers. You can try to run the following code to implement onreset attribute −Example Student Name: Student Subject: function display() { alert("Form reset successfull!"); }
A module is a container of packages and each module contains a module descriptor that includes module name, module dependencies, it means that the name of other modules depends on and name of the packages it exports that can be used only by modules that depend on it.module com.tutorialspoint.app { /** Modules upon which the module com.tutorialspoint.app depends on */ requires com.tutorialspoint.services; /** Packages exposed by this module which can be used by other modules */ exports com.tutorialspoint.app.util; }There are three different compilation modes provided by Java 9 Module: Legacy mode, single module mode, and multi-module mode.Compilation modes of ... Read More
The onpause attribute trigger when the media is paused. You can try to run the following code to implement the onpause attribute −Example Play Your browser does not support the video element. function myFunction() { document.getElementById("test").innerHTML = "Media paused!"; }
The onwheel attribute triggers when the mouse wheel rolls up or down over an element. You can try to run the following code to implement onwheel attribute −Example This is demo heading. Click above and use mouse wheel to change the heading color. function mouseWheel() { document.getElementById("myid").style.color = "red"; }
The onwaiting attribute triggers when a video pause and buffers to reume again. You can try to run the following code to implement the onwaiting attribute −Example Play Your browser does not support the video element. function myFunction() { document.getElementById("test").innerHTML = "Media resumes again"; }