Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Toggles dark/light mode for the page using a button.
<!DOCTYPE html>
<html>
<head>
<title>Dark Mode</title>
</head>
<body>
<button id="btn">Toggle Dark Mode</button>
<script>
document.getElementById('btn').onclick = function() {
document.body.classList.toggle('dark');
};
document.head.insertAdjacentHTML('beforeend','<style>.dark { background:#222; color:#fff; }</style>');
</script>
</body>
</html>JSBin is an online code editor focused on web development that allows users to write and test HTML, CSS, and JavaScript in real-time. It is designed for rapid prototyping and debugging of web code directly in the browser.
Origin & Creator
JSBin was created by Remy Sharp in 2009 to provide a simple, accessible online platform for testing and sharing web code snippets.
Industrial Note
Widely used by web developers for prototyping and debugging front-end code. Not suitable for full-stack development or large-scale production projects.