- 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
178 Views
The HTML onload event attribute is triggered when an object has been loaded in an HTML document.SyntaxFollowing is the syntax −Let us see an example of HTML onload event Attribute−Example Live Demo body { color: #000; height: 100vh; background-color: #FBAB7E; background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%); text-align: center; padding: 20px; } function get() { alert("Hi! you just refresh the document."); } HTML onload Event Attribute Demo Now try to refresh this document. OutputNow try to reload the document to observe how onload event attribute works.
55 Views
The HTML onbeforeprint event attribute is triggered when a page is about to be printed or before the print dialog box appears in the HTML document.SyntaxFollowing is the syntax −Let us see an example of HTML onbeforeprint event Attribute−Example Live Demo body { color: #000; height: 100vh; background-color: #FBAB7E; background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%); text-align: center; padding: 20px; } p { font-size: 1.1rem; } HTML onbeforeprint Event Attribute Demo ... Read More
47 Views
The HTML onafterprint event attribute is triggered when a page has started printing or if the print dialog box has been closed in the HTML document.SyntaxFollowing is the syntax −Let us see an example of HTML onafterprint event Attribute−Example Live Demo body { color: #000; height: 100vh; background-color: #FBAB7E; background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%); text-align: center; padding: 20px; } p { font-size: 1.1rem; } HTML onafterprint Event Attribute Demo ... Read More
280 Views
The HTML form method attribute defines how to send form-data that means to be sent as URL variable or to be sent as an HTTP post transaction.SyntaxFollowing is the syntax −Here get sends the form data as URL variable and post sends the form data as an HTTP post transaction.Let us see an example of HTML Form method Attribute−Example Live Demo body { color: #000; height: 100vh; background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat; text-align: center; } input { width: 315px; ... Read More
99 Views
The HTML Location assign() method loads a new HTML document without replacing the URL of the current HTML document from the document history.SyntaxFollowing is the syntax −location.assign(URL)Let us see an example of HTML Location assign() Method−Example Live Demo body { color: #000; height: 100vh; background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat; text-align: center; } .btn { background: #db133a; border: none; height: 2rem; border-radius: 20px; width: 330px; ... Read More
44 Views
The HTML KeyboardEvent which property returns the Unicode character code of the key that fires the onkeypress event, onkeydown event or onkeyup event in an HTML document.SyntaxFollowing is the syntax −event.whichLet us see an example of HTML KeyboardEvent which property −Example Live Demo body { color: #000; height: 100vh; background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat; text-align: center; } input { border: 2px solid #fff; padding: 8px; background: transparent; width: 310px; ... Read More
97 Views
The HTML navigator javaEnabled() method returns a boolean value that defines whether the browser has java enable or not.SyntaxFollowing is the syntax −navigator.javaEnabled()Let us see an example of HTML navigator userAgent property −Example Live Demo body { color: #000; height: 100vh; background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat; text-align: center; } .btn { background: #db133a; border: none; height: 2rem; border-radius: 20px; width: 330px; display: block; ... Read More
143 Views
The HTML navigator userAgent property returns the value of the user-agent header sent by the browser to the server.SyntaxFollowing is the syntax −navigator.userAgentLet us see an example of HTML navigator userAgent property −Example Live Demo body { color: #000; height: 100vh; background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat; text-align: center; } .btn { background: #db133a; border: none; height: 2rem; border-radius: 20px; width: 330px; display: block; ... Read More
71 Views
The HTML navigator product property returns the browser’s engine name.SyntaxFollowing is the syntax −navigator.productLet us see an example of HTML navigator product property −Example Live Demo body { color: #000; height: 100vh; background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat; text-align: center; } .btn { background: #db133a; border: none; height: 2rem; border-radius: 20px; width: 330px; display: block; color: #fff; outline: none; ... Read More
82 Views
The HTML navigator platform property returns the browser compiled platform.SyntaxFollowing is the syntax −navigator.platformLet us see an example of HTML navigator platform property −Example Live Demo body { color: #000; height: 100vh; background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat; text-align: center; } .btn { background: #db133a; border: none; height: 2rem; border-radius: 20px; width: 330px; display: block; color: #fff; outline: none; ... Read More