Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
HTML Articles
Page 131 of 151
Execute a script when the media is ready to start playing in HTML?
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!"); }
Read MoreExecute a script when the media has started playing in HTML?
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!"); }
Read MoreExecute a script when the window's history changes in HTML?
When the window’s history change, the onpopstate event triggers. You can add it like this −Example This is demo text
Read MoreHow do we include an inline sub window in HTML?
Inline sub window is an iframe and you can include it using the tag.The HTML tag supports the following additional attributes −AttributeValueDescriptionalignleftrighttopmiddlebottomSpecifies how to align the iframe according to the surrounding text.frameborder10Specifies whether or not to display border around the frame.heightpixelsSpecifies the height of the inline frame.longdescURLA URL to a long description of the frame contentsmarginheightpixelsAllows 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 ...
Read MoreHow do we add a sample computer code in HTML?
Use the tag to display a sample computer code. The HTML tag is used to display the output of a computer program.ExampleYou can try to run the following code to implement tag in HTML − HTML samp Tag The header file always starts with #include.
Read MoreExecute a script when the seeking attribute is set to true indicating that seeking is active in HTML?
Use the onseeking attribute to indicate that seeking is active in a video in HTML.ExampleYou can try to run the following code to execute a script when the seeking attribute is set to true indicating that seeking is active in HTML − Your browser does not support the video element. function display() { alert("Seeking starts!"); }
Read MoreHow to add multi-language content in HTML?
The lang attribute in HTML allows you to set content for languages other than English. You can try to run the following code to implement lang attribute.ExampleHere, we have added content in French and Spanish as well. English This is demo text French Ceci est un texte de démonstration Spanish Este es un texto de demostración
Read MoreCreate a hidden paragraph in HTML5
Use the hidden attribute in HTML5 to create a hidden paragraph in HTML5 i.e. an element no longer relevant.ExampleYou can try to run the following code to implement hidden attribute in HTML5 − Heading This is a demo paragraph and visible. This is a demo paragraph and hidden.
Read MoreHow to set whether the dragged data is copied, moved, or linked, when dropped in HTML?
Use the dropzone attribute to set whether the dragged data is copied, moved or linked.Copy − The drop will create a copy of the dragged element.Move − The dragged element will get moved to the new location.Link − It creates a link to the dragged data Try the following to work with dropzone attribute in JavaScript − None of the browsers supports this attribute now.
Read MoreHow to display a URL which explains the quote/deleted/inserted text in HTML?
The cite attribute allows you to add URL and explain why the text was deleted or inserted.ExampleYou can try to run the following code to implement cite attribute − Define WordPress WordPress is open source software you can use to create a beautiful website, blog, or app.
Read More