HTML Articles

Page 29 of 151

HTML ontoggle Event Attribute

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 227 Views

The HTML ontoggle event attribute is triggered when a user opens or closes the HTML element in an HTML document.SyntaxFollowing is the syntax −ContentLet us see an example of HTML ontoggle event Attribute −Example    body {       color: #000;       height: 100vh;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat;       text-align: center;       padding: 20px;    } HTML ontoggle Event Attribute Demo Hi! I'm summary element This is a paragraph with some dummy content.    function toggleFn() { ...

Read More

HTML onwheel Event Attribute

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 154 Views

The HTML onwheel event attribute is triggered when the user moves the wheel of the mouse on an HTML element in an HTML document.SyntaxFollowing is the syntax −ContentLet us see an example of HTML onwheel event Attribute −Example    body {       color: #000;       height: 100vh;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat;       text-align: center;       padding: 20px;    }    .wheel {       border: 2px solid #fff;       padding: 10px;    } HTML onwheel Event Attribute ...

Read More

HTML onerror Event Attribute

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 338 Views

The HTML onerror event attribute is triggered when an error occurs while loading an external file in an HTML document.SyntaxFollowing is the syntax −ContentLet us see an example of HTML onerror event Attribute −Example    body {       color: #000;       height: 100vh;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat;       text-align: center;       padding: 20px;    }    .btn {       background: #db133a;       border: none;       height: 2rem;       border-radius: 2px;       width: 40%; ...

Read More

HTML onkeydown Event Attribute

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 209 Views

The HTML onkeydown event attribute is triggered when the user is pressing a key on the keyboard.SyntaxFollowing is the syntax −ContentLet us see an example of HTML onkeydown event Attribute −Example    body {       color: #000;       height: 100vh;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat;       text-align: center;       padding: 20px;    }    .show {       font-size: 1.2rem;    } HTML onkeydown Event Attribute Demo    function keyFn() {       document.querySelector(".show").innerHTML = 'You enter: ' + document.querySelector("textarea").value;    } OutputEnter your message in white text area to observe how onkeydown event attribute works.

Read More

HTML onkeyup Event Attribute

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 220 Views

The HTML onkeyup event attribute is triggered when the user releases a key on the keyboard.SyntaxFollowing is the syntax −ContentLet us see an example of HTML onkeyup event Attribute −Example    body {       color: #000;       height: 100vh;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat;       text-align: center;       padding: 20px;    }    .show {       font-size: 1.2rem;    } HTML onkeyup Event Attribute Demo    function keyFn() {       document.querySelector(".show").innerHTML = 'You enter: ' + document.querySelector("textarea").value;    } OutputEnter your message in white text area to observe how onkeyup event attribute works.

Read More

HTML onkeypress Event Attribute

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 265 Views

The HTML onkeypress event attribute is triggered when the user presses a key on the keyboard.SyntaxFollowing is the syntax −ContentLet us see an example of HTML onkeypress event Attribute −Example    body {       color: #000;       height: 100vh;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat;       text-align: center;       padding: 20px;    }    .show {       font-size: 1.2rem;    } HTML onkeypress Event Attribute Demo    function keyFn() {       document.querySelector(".show").innerHTML = 'You enter: ' + document.querySelector("textarea").value;    } OutputEnter your message in white text area to observe how onkeypress event attribute works.

Read More

HTML Window alert( ) Method

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 957 Views

The HTML window alert() method shows an alert box with the defined message and an OK button in an HTML document.SyntaxFollowing is the syntax −alert(“message”);Let us see an example of HTML window alert() method −Example    body {       color: #000;       height: 100vh;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat;       text-align: center;       padding: 20px;    }    .btn {       background: #db133a;       border: none;       height: 2rem;       border-radius: 2px;       width: ...

Read More

HTML Window atob( ) Method

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 522 Views

The HTML window btoa() method encodes a string of data in base-64 string which can be decoded by atob() method in the HTML document.SyntaxFollowing is the syntax −window.btoa(string_to_be_encoded);Let us see an example of HTML window btoa() method −Example    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: 2px;       width: 40%;     ...

Read More

HTML novalidate Attribute

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 350 Views

The HTML novalidate attribute define that while submitting the form the form data should not be validated in an HTML document.SyntaxFollowing is the syntax −Let us see an example of HTML novalidate Attribute −Example    body {       color: #000;       height: 100vh;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat;       text-align: center;    }    input[type='text'] {       width: 300px;       padding: 8px 16px;       border: 2px solid #fff;       background: transparent;       border-radius: 20px;       ...

Read More

HTML Navigator appCodeName Property

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 201 Views

The HTML navigator appCodeName property returns the browser’s code name.SyntaxFollowing is the syntax −navigator.appCodeNameLet us see an example of HTML navigator appCodeName property −Example    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
Showing 281–290 of 1,508 articles
« Prev 1 27 28 29 30 31 151 Next »
Advertisements