I am currently creating a site mainly using HTML and CSS.
As the title says, I don't know how to change the font with a single button.

I want to place a button like the image below and change the font of the whole body or text by clicking the button.
And I want to set it back to the original font with just one click.

I don't know much about js, so I don't know how to do it.
Thanks for your ideas and wisdom. Thank you.

  • Answer # 1

    I think you should dynamically change the Style with JavaScript

    const element = document.getElementById ("ID where you want to change");
    h1.style.fontFamily = "Font to change";

    You can do this when you click this