Is it possible to change the background color on button click; of the entire document, using only CSS and HTML5?
(e.g.: it\'s trivial in Ja
You can (ab?)use the :target selector. This probably won't work in older browsers. Here's a super simple example I made that toggles the background when the link is clicked.
The concept is to apply CSS styling to targeted elements. In the code below, clicking the link will target the body's ID, which applies the style in body:target (changing the background color).
Click
JSfiddle