Add a Single Line Input Field in HTML

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

701 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          

Execute Script on Mouse Wheel Scroll in HTML

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

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

Execute a Script When Media is Ready to Start Playing in HTML

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

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

Execute a Script When Media Starts Playing in HTML

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

131 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 Script on Window History Changes in HTML

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

187 Views

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

Execute Script for Context Menu in HTML

Govinda Sai
Updated on 30-May-2020 22:16:07

142 Views

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

Include Attributes for Table Columns in HTML

Arjun Thakur
Updated on 30-May-2020 22:14:08

343 Views

Use the tag to include attributes for table columns. The HTML tag allows authors to group together attribute specifications for table columns. It does not group columns together structurally -- that is the role of the element.The following are the attributes −AttributeValueDescriptionAlignrightleftcenterjustifycharDefines horizontal alignment, not supported in Html5.CharcharacterDefines a character to use to align text on (use with align = "char"), not supported in Html5.CharoffpixelSpecifies an alignment offset (either in pixels or percentage value) against the first character as specified with the char attribute, not supported in Html5SpannumberDefines the number of columns the should span, not ... Read More

Include Groups of Table Columns in HTML

varma
Updated on 30-May-2020 22:13:25

1K+ Views

Use the tag to include groups of table columns.The HTML tag is used for specifying properties for a group of columns within a table. If you need to apply different properties to a column within a colgroup, you can use the HTML col tag within the colgroup tag.The following are the attributes −AttributeValueDescriptionAlignrightleftcenterjustifycharDefines horizontal alignment, not supported in Html5.CharcharacterDefines a character to use to align text on (use with align ="char"), not supported in Html5.CharoffpixelDefines the number of columns the should span, not supported in Html5SpannumberDefines the number of columns the should span, not supported in ... Read More

Include an Inline Sub Window in HTML

vanithasree
Updated on 29-May-2020 23:06:51

513 Views

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 More

Add Sample Computer Code in HTML

seetha
Updated on 29-May-2020 23:04:24

178 Views

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.    

Advertisements