Found 2416 Articles for HTML

Execute a script when a mouse wheel is being scrolled over an element in HTML?

Nikitha N
Updated on 30-May-2020 22:58:31

262 Views

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!");          }          

How do we add a single-line input field in HTML?

Anvi Jain
Updated on 30-May-2020 22:59:17

565 Views

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          

How to add a set of frames in HTML?

Priya Pallavi
Updated on 24-Jun-2020 08:57:21

351 Views

Use the tag to add a set of frames. The HTML tag is used to divide the window into frames. Note − This tag is not supported in HTML5. Do not use.The following are the attributes −AttributeValueDescriptionColscolumn sizeSpecifies the number of columns and their width in either pixels, percentages, or relative lengths. Default is 100%Rowsrow sizeSpecifies the number of rows and their height in either pixels, percentages, or relative lengths. Default is 100%.ExampleYou can try to run the following code to add a set of frames using the tag −           HTML frameset Tag                                                 Your browser does not support frames.                    

How to include an input field in HTML?

vanithasree
Updated on 03-Mar-2020 07:24:01

236 Views

The HTML tag is used within a form to declare an input element - a control that allows the user to input data.The following are the attributes −AttributeValueDescriptionacceptcontent typesSpecifies a comma-separated list of content types that the server acceptsalignleftrighttopmiddlebottomDeprecated − Defines the alignment of contentaltTextThis specifies text to be used in case the browser/user agent can't render the input controlautocomplete onoffSpecifies for enabling or disabling of autocomplete in elementautofocus Autofocusspecifies that element should automatically get focus when the page loadscheckedCheckedIf type = "radio" or type = "checkbox" it will already be selected when the page loads.disabledDisabledDisables the input control. ... Read More

How to display an image in HTML?

Nitya Raut
Updated on 30-May-2020 23:01:27

8K+ Views

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

How do we create a sub window in HTML?

George John
Updated on 03-Mar-2020 07:13:49

677 Views

Use the tag to create a sub window. The HTML tag is used to specify each frame within a frameset tag.Note − This tag is not supported in HTML5. Do not use.The following are the attributes −AttributeValueDescriptionFrameborder0 or 1Specifies whether or not to display border around the frame.MarginheightpixelsAllows you to specify the width of the space between the left and right of the frame's borders and the frame's content. The value is given in pixels. For example marginwidth = "10".MarginwidthpixelsSpecifies the margin, in pixels, between the frame's contents and it's left and right margins.Nameframe nameName of the frame.NoresizenoresizeWhen ... Read More

How do we create a footer for a document or section in HTML5?

Jennifer Nicholas
Updated on 03-Mar-2020 07:06:18

212 Views

Use the HTML tag to display a footer for a document or section. You can try to run the following code to implement tag −Example           HTML Footer Tag                        Simply Easy Learning          You're visiting tutorialspoint.com - tutorial hub for simply easy learning.                      © Copyright 2018, All Rights Reserved          

How do we define the start of a term in a definition list in HTML?

Nikitha N
Updated on 03-Mar-2020 07:05:35

194 Views

The HTML tag is used to define the start of a term in a definition list. A definition list is similar to other lists but in a definition list, each list item contains two entries; a term and a description.ExampleYou can try to run the following code to define the start of a term in a definition list using the tag −           HTML dt Tag                        Definition List          A list of terms and their definitions/descriptions.          JAVA          Tutorial on JAVA Programming Language.          Android          Tutorial on Android Operating System.          

Execute a script when the seeking attribute is set to false indicating that seeking has ended in HTML?

Chandu yadav
Updated on 03-Mar-2020 07:03:46

117 Views

The onseeked attribute executes a script when the user skips or moves to a new position in the audio or video.ExampleYou can try to run the following code to implement onseeked attribute −           Play                                    Your browser does not support the video element.                      function myFunction() {          document.getElementById("test").innerHTML = "Current position: " +          document.getElementById("myid").currentTime;          }          

Execute a script when a mouse button is released over an element in HTML?

radhakrishna
Updated on 03-Mar-2020 07:04:51

150 Views

When the mouse button is released over an element, the onmouseup event triggers. You can try to run the following code to implement onmouseup attribute −Example                    This is demo heading.             Click above and then release.                function mouseDown() {             document.getElementById("myid").style.color = "yellow";          }          function mouseUp() {             document.getElementById("myid").style.color = "blue";          }          

Advertisements