AmitDiwan has Published 10740 Articles

How to create a download link with HTML?

AmitDiwan

AmitDiwan

Updated on 08-May-2020 14:15:52

855 Views

To create a download link with HTML, the code is as follows −Example Live Demo Download Link example Click on the image above to download it OutputThe above code will produce the following output −

How to create a flip box with CSS?

AmitDiwan

AmitDiwan

Updated on 08-May-2020 14:04:38

813 Views

To create a flip box with CSS, the code is as follows −Example Live Demo    body {       font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;       margin:20px;    }    .flipCard {       background-color: transparent;       width: 300px; ... Read More

How to find out if an element is hidden with JavaScript?

AmitDiwan

AmitDiwan

Updated on 08-May-2020 13:58:35

518 Views

To find out if an element is hidden with JavaScript, the code is as follows −Example Live Demo    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .hiddenDiv {       width: 100%;       padding: 20px;   ... Read More

How to detect whether the browser is online or offline with JavaScript?

AmitDiwan

AmitDiwan

Updated on 08-May-2020 13:55:22

458 Views

To detect whether the browser is online or offline with JavaScript, the code is as follows −Example Live Demo Online or offline with JavaScript example Click the button below to check if you are online or not Check online/offline    function checkOnlineOffline() {       if(navigator.onLine===true){ ... Read More

How to add an active class to the current element with JavaScript?

AmitDiwan

AmitDiwan

Updated on 08-May-2020 13:35:43

2K+ Views

To add an active class to the current element with JavaScript, the code is as follows −Example Live Demo    .btn {       border: none;       outline: none;       padding: 10px 16px;       background-color: #6ea2f0;       cursor: ... Read More

How to remove a class name from an element with JavaScript?

AmitDiwan

AmitDiwan

Updated on 08-May-2020 13:33:46

443 Views

To remove a class name from an element with JavaScript, the code is as follows −Example Live Demo    .newStyle {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;       width: 100%;       padding: 25px;       background-color: rgb(147, 80, ... Read More

How to add a class name to an element with JavaScript?

AmitDiwan

AmitDiwan

Updated on 08-May-2020 13:32:10

447 Views

To add a class name to an element with JavaScript, the code is as follows −Example Live Demo    .newStyle {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;       width: 100%;       padding: 25px;       background-color: rgb(147, 80, ... Read More

How to toggle between adding and removing a class name from an element with JavaScript?

AmitDiwan

AmitDiwan

Updated on 08-May-2020 13:29:47

236 Views

To toggle between adding and removing a class name from an element with JavaScript, the code is as follows −Example Live Demo    .newStyle {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;       width: 100%;       padding: 25px;     ... Read More

How to toggle text with JavaScript?

AmitDiwan

AmitDiwan

Updated on 08-May-2020 13:28:16

2K+ Views

To toggle text with JavaScript, the code is as follows −Example Live Demo    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .textDiv {       font-size: 20px;       background-color: rgb(199, 228, 157);       width: ... Read More

How to switch between dark and light mode with CSS and JavaScript?

AmitDiwan

AmitDiwan

Updated on 08-May-2020 13:26:19

477 Views

To switch between dark and light mode with JavaScript, the code is as follows −Example Live Demo    body {       padding: 25px;       background-color: white;       color: black;       font-size: 25px;       font-family: "Segoe UI", Tahoma, ... Read More

Advertisements