Use the form attribute in HTML to set the name of the one or more form the element belongs to in HTML.ExampleYou can try to run the following code to implement the form attribute − SubjectID: Subject Name: Total Students: Click
When the web browser window is resized, the onresize attribute triggers.ExampleYou can try to run the following code to implement onresize attribute − Resize the window to trigger event. function display() { alert("Web browser window resized!"); }
The onmouseover attribute triggers when a mouse pointer moves over an element in HTML.ExampleYou can try to run the following code to implement onmouseover attribute − This is demo heading. Keep the mouse cursor on the heading to change the color. function display() { document.getElementById("myid").style.color = "red"; }
Use the tag in HTML to display an image. The following are the attributes −AttributeValueDescriptionAligntopbottommiddleleftrightDeprecated− Specifies the alignment for the image.AlttextSpecifies alternate textBorderpixelsDeprecated − Specifies the width of the image border.crossorigin anonymous use-credentialsIt allows images from third-party sites that allow cross-origin access to be reused with canvas.Heightpixels or %Specifies the height of the image.hspacepixelsDeprecated − Amount of white space to be inserted to the left and right of the object.IsmapURLDefines the image as a server-side image map.LongdesctextDeprecated − Specifies a URI/URL of a long description - this can elaborate on a shorter description specified with the alt attribute.SrcURLthe url ... Read More
Use the tag to add a single-line input field. The HTML tag is used for querying a document through a text field. The tag can be used anywhere but head tag is preferable. Note: It is a deprecated tag and should not be used.The following are the attributes −AttributeValueDescriptionPromptstringLabel for the text fieldActionURLused when a query needs to be sent to a different URLExampleTry the following code − HTML isindex Tag
When a mouse wheel is being scrolled over an element, the onwheel attribute triggers.ExampleYou can try to run the following code to execute a script when a mouse wheel is being scrolled over an element in HTML − This is demo text. Roll the mouse wheel here. function display() { alert("Mouse Wheel used!"); }
Use the oncanplay attribute to define when an audio/ video is ready to start playing.ExampleYou can try to run the following code to learn how to execute a script when the media is ready to start playing − Your browser does not support the video element. function display() { alert("Video loaded!"); }
Use the onplaying attribute to let users know that the audio/ video started playing.ExampleYou can try to run the following code to learn how to execute a script when the media has started playing − Your browser does not support the video element. function display() { alert("Video started playing!"); }
When the window’s history change, the onpopstate event triggers. You can add it like this −Example This is demo text
When a element is shown as a context menu in HTML, the onshow event fires.ExampleYou can try to run the following code to execute a script when a element is displayed as a context menu − HTML menu Right click inside here.... function display() { alert("The context menu will be visible now."); }
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP