HTML Articles

Page 130 of 151

How to specify the number of visible options for <select> in HTML?

varma
varma
Updated on 01-Jun-2020 135 Views

Use the size attribute to set the number of visible options for element in HTML.ExampleYou can try to run the following code to implement size attribute −           Select the countries you have visited till now,                India          US          Canada          Australia          Bangladesh          

Read More

Enable an extra set of restrictions for the content in an <iframe> in HTML?

Giri Raju
Giri Raju
Updated on 01-Jun-2020 52 Views

Use the sandbox attribute to enable an extra set of restrictions for the content in an in HTML.ExampleYou can try to run the following code to implement sandbox attribute −                    Your browser does not support iframes.          

Read More

How to display a short hint that describes the expected value of the element in HTML?

Daniol Thomas
Daniol Thomas
Updated on 31-May-2020 349 Views

Use the placeholder attribute in HTML to display a hint describing the expected value of the element.ExampleYou can try to run the following code to implement placeholder attribute −           Login                                              

Read More

How to specify that a user can enter more than one value in HTML?

Nishtha Thakur
Nishtha Thakur
Updated on 31-May-2020 189 Views

Use the multiple attribute in HTML to specify a user can enter more than one value.ExampleYou can try to run the following code to implement multiple attribute −           Upload multiple files                                  After uploading multiple files, click Submit.                    

Read More

Set the name of the form the element belongs to in HTML?

Jennifer Nicholas
Jennifer Nicholas
Updated on 30-May-2020 166 Views

Use the form attribute in HTML to set the name of the one or more form the element belongs to in HTML.ExampleYou can try to run the following code to implement the form attribute −                    SubjectID:          Subject Name:          Total Students:             Click    

Read More

Execute a script when the browser window is being resized in HTML?

Daniol Thomas
Daniol Thomas
Updated on 30-May-2020 320 Views

When the web browser window is resized, the onresize attribute triggers.ExampleYou can try to run the following code to implement onresize attribute −           Resize the window to trigger event.                function display() {             alert("Web browser window resized!");          }          

Read More

Execute a script when a mouse pointer moves over an element in HTML?

usharani
usharani
Updated on 30-May-2020 402 Views

The onmouseover attribute triggers when a mouse pointer moves over an element in HTML.ExampleYou can try to run the following code to implement onmouseover attribute −                    This is demo heading.             Keep the mouse cursor on the heading to change the color.                function display() {             document.getElementById("myid").style.color = "red";          }          

Read More

How to display an image in HTML?

Nitya Raut
Nitya Raut
Updated on 30-May-2020 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 add a single-line input field in HTML?

Anvi Jain
Anvi Jain
Updated on 30-May-2020 746 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          

Read More

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

Nikitha N
Nikitha N
Updated on 30-May-2020 378 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!");          }          

Read More
Showing 1291–1300 of 1,508 articles
« Prev 1 128 129 130 131 132 151 Next »
Advertisements