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 130 of 151
How to specify the number of visible options for <select> in HTML?
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 MoreEnable an extra set of restrictions for the content in an <iframe> in HTML?
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 MoreHow to display a short hint that describes the expected value of the element in HTML?
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 MoreHow to specify that a user can enter more than one value in HTML?
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 MoreSet the name of the form the element belongs to in HTML?
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 MoreExecute a script when the browser window is being resized in HTML?
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 MoreExecute a script when a mouse pointer moves over an element in HTML?
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 MoreHow to display an image in HTML?
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 MoreHow do we add a single-line input field in HTML?
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 MoreExecute a script when a mouse wheel is being scrolled over an element in HTML?
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