Found 2202 Articles for HTML

How to display an image in HTML?

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

9K+ 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

1K+ 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

311 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

248 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

175 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

226 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";          }          

Execute a script when the window's history changes in HTML?

Srinivas Gorla
Updated on 30-May-2020 22:47:57

181 Views

When the window’s history change, the onpopstate event triggers. You can add it like this −Example           This is demo text    

Execute a script when the media has started playing in HTML?

Ankith Reddy
Updated on 30-May-2020 22:48:38

126 Views

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

Execute a script when the playback position of the media has changed in HTML?

Vrundesha Joshi
Updated on 24-Jun-2020 08:52:26

124 Views

The ontimeupdate attribute event triggers when the playing position of the media, for example, video, is changed. It can be fast forward, or backward in a video or audio.ExampleYou can try to run the following code implement ontimeupdate 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 the media is ready to start playing in HTML?

Sreemaha
Updated on 30-May-2020 22:50:00

158 Views

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

Advertisements