- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 2416 Articles for HTML
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
312 Views
The HTML onsubmit event attribute is triggered when the form is submitted in an HTML document.SyntaxFollowing is the syntax −Let us see an example of HTML onsubmit event Attribute −Example Live Demo body { color: #000; height: 100vh; background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat; text-align: center; padding: 20px; } textarea { border: 2px solid #fff; background: transparent; font-size: 1rem; } ::placeholder { color: #000; ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
72 Views
The HTML onreset event attribute is triggered when the form is reset in an HTML document.SyntaxFollowing is the syntax −ExampleLet us see an example of HTML onreset event Attribute − Live Demo body { color: #000; height: 100vh; background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat; text-align: center; padding: 20px; } textarea { border: 2px solid #fff; background: transparent; font-size: 1rem; } ::placeholder { color: #000; ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
76 Views
The HTML onresize attribute is triggered when user resize the browser window.SyntaxFollowing is the syntax −Let us see an example of HTML onresize event Attribute −Example Live Demo body { color: #000; height: 100vh; background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat; padding: 20px; } HTML onresize Event Attribute Demo Now resize the browser window function resizeFn() { document.body.style.background = 'linear-gradient(45deg, #8BC6EC 0%, #9599E2 100%) no-repeat'; } OutputNow resize the browser window to observe how onresize event attribute works.
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
161 Views
The HTML onpaste attribute is triggered when user paste some content in an HTML element in an HTML document.SyntaxFollowing is the syntax −Let us see an example of HTML onpaste event Attribute −Example Live Demo body { color: #000; height: 100vh; background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat; text-align: center; padding: 20px; } p { border: 2px solid #fff; padding: 8px; text-align: justify; } textarea { ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
770 Views
Let us first create a table −mysql> create table DemoTable ( Score int ); Query OK, 0 rows affected (0.65 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(45); Query OK, 1 row affected (0.11 sec) mysql> insert into DemoTable values(29); Query OK, 1 row affected (0.11 sec) mysql> insert into DemoTable values(56); Query OK, 1 row affected (0.09 sec) mysql> insert into DemoTable values(24); Query OK, 1 row affected (0.09 sec) mysql> insert into DemoTable values(32); Query OK, 1 row affected (0.09 sec)Display all records from the table using select statement −mysql> select ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
234 Views
The HTML oninvalid event attribute is triggered when an input field is invalid while submitting the form in an HTML document.SyntaxFollowing is the syntax −ExampleLet us see an example of HTML oninvalid event Attribute − body { color: #000; height: 100vh; background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat; text-align: center; padding: 20px; } textarea { border: 2px solid #fff; background: transparent; font-size: 1rem; } ::placeholder { ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
235 Views
The HTML oninput event attribute is triggered when the user enters input in an input/textarea HTML element in an HTML document.SyntaxFollowing is the syntax −ExampleLet us see an example of HTML on input event Attribute − body { color: #000; height: 100vh; background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat; text-align: center; padding: 20px; } textarea { border: 2px solid #fff; background: transparent; font-size: 1rem; } ::placeholder { color: #000; font-size: 1rem; } HTML oninput Event Attribute Demo function inputFn() { document.querySelector('textarea').style.background = '#ffffff36'; } OutputNow enter your message in the text area to observe how oninput event attribute works.
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
134 Views
The HTML onfocus event attribute is used when an HTML element gets focus in an HTML document.SyntaxFollowing is the syntax −ExampleLet us see an example of HTML onfocus event Attribute −Live Demo body { color: #000; height: 100vh; background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat; text-align: center; padding: 20px; } textarea { border: 2px solid #fff; background: transparent; font-size: 1rem; } ::placeholder { color: #000; font-size: 1rem; } HTML onfocus Event Attribute Demo function focusFn() { document.querySelector('textarea').style.background = '#ffffff36'; } OutputNow enter your message in the text area to observe how onfocus event attribute works.
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
98 Views
The HTML ondrag event attribute is triggered when the user drags an HTML element in an HTML document. The HTML image and link elements are dragged by default so there is no need to specify ondrag attribute on them.SyntaxFollowing is the syntax −ExampleLet us see an example of HTML ondrag event Attribute −Live Demo body { color: #000; height: 100vh; background-color: #FBAB7E; background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%); text-align: center; } .drop-target { display: inline-block; ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
101 Views
The HTML oncontextmenu event attribute is triggered when the user right clicks on an HTML element to open the context menu in an HTML document.SyntaxFollowing is the syntax −ExampleLet us see an example of HTML oncontextmenu event Attribute −Live Demo body { color: #000; height: 100vh; background-color: #FBAB7E; background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%); text-align: center; padding: 20px; } .box { background: #db133a; width: 140px; height: 140px; ... Read More