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
Use the rowspan attribute to set the number of rows a table cell should span. To merge cells in HTML, use the colspan and rowspan attribute. The rowspan attribute is for number of rows a cell should span, whereas the colspan attribute is for number of columns a cell should span.Example table, th, td { border: 1px solid black; width: 100px; height: 50px; } Heading
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.
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
When an element has been dragged in HTML to a valid drop target, the ondragenter attribute fires.ExampleYou can try to run the following code to implement the ondragenter attribute − #boxA, #boxB { float:left;padding:10px;margin:10px; -moz-user-select:none; } #boxA { background-color: #6633FF; width:75px; height:75px; } #boxB { background-color: #FF6699; width:150px; height:150px; } function dragStart(ev) { ev.dataTransfer.effectAllowed = 'move'; ev.dataTransfer.setData("Text", ev.target.getAttribute('id')); ev.dataTransfer.setDragImage(ev.target,0,0); return true; } Drag and drop HTML5 demo Try to drag the purple box around. Drag Me Dustbin
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.
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
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!"); }
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"; }
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
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP