Learn html - html tutorial - Onwheel attribute in html - html examples - html programs
- The onwheel attribute specifies the wheel of a pointing device is rolled up or down over an element.
- The onwheel attribute also defines the user scrolls on an element by using a mouse.
- The onwheel attribute is a section of the Event Attributes.
Syntax for onwheel attribute in HTML:
Difference between HTML 4.01 and HTML 5 for onwheel Attribute:
HTML 4.01
- The onwheel attribute does not supported.
HTML 5
- The onwheel attribute is added new in HTML 5.
Applies To:
Element |
Attribute |
All HTML Elements |
onwheel |
onwheel Attribute Values:
Value |
Description |
script |
The script can run on onwheel. |
Sample Coding for onwheel Attribute in HTML:
Code Explanation for onwheel Attribute in HTML:
- head tag - start with <head> and its end with </head>.
- <style> tag is used to set color for a div tag.
- #wikitechy id is created to apply for style.
- To apply style for border with 2px solid and black color.
- <div> tag used to group the elements.
- id attribute is used to set red color for the contents inside the <div> tag.
- “#myDIV” is used to apply styles to the <div> element.
- The onwheel attribute is used to call OnWheel() JavaScript function when the content is rolled down or upwards by mouse wheel.
- The JavaScript function OnWheel() is used to display the content in blue color when mouse wheel rolled.
Output for onwheel Attribute in HTML:
- The output has been displayed.
- When user try to scroll the mouse wheel the font color of <div> is changes to blue.
Browser Support for onwheel Attribute in HTML:
Related Searches to onwheel Attribute in html
onwheel Attribute
javascript onwheel direction
javascript mouse wheel up or down
attribute wheel graphic organizer
jquery on wheel
javascript wheeldelta
javascript onwheel event
react onwheel
wheelevent
html attributes
html tutorialshtml editor html code html form html tutorial html color html color codes html table html img html5 html code for website html and css html programs html website free html editor html5 tutorial wysiwyg html editor html tutorial pdf html converter php tutorial html example html tutorial css tutorial html css html tags html basics code html html online html mailto html lang html tags list