🌍 Public
Viewing a saved revision (read-only)
4bb753015eb14c6cb91d9af63f60d9f2
onclick changing background color
This example demonstrates how clicking anywhere on an HTML page changes the background color to yellow, while a specific button turns blue upon page load. The page contains a simple message, a styled button, and uses vanilla JavaScript with inline `onclick` event handling and `document.getElementById` to manipulate the DOM. It relies on the Window object's `onclick` property and element style properties (`style.backgroundColor`) rather than any external libraries or frameworks, though it references a React starter as an alternative approach.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.