Basic Level:

  1. Create a button that, when clicked, changes the text inside a <p> tag using innerText.
  2. Write a function that, when clicking a button, changes the text inside a <div> using innerHTML.
  3. Create a button that, when clicked, updates a <p> element’s textContent with a new message.
  4. Add a button that, when clicked, sets an attribute src to an <img> tag to change the image.
  5. Create a button that toggles the hidden attribute on a paragraph using setAttribute.

Intermediate Level:

  1. Create a button that, when clicked, changes the background color of a <div> using style.backgroundColor.
  2. Write a function that dynamically adds and removes a CSS class from a <p> element using classList.toggle().
  3. Create a list with three items and a button that, when clicked, adds a new item dynamically using innerHTML.
  4. Create a button that removes a CSS class from an element using classList.remove().
  5. Write a function that changes the href attribute of an <a> tag using setAttribute when a button is clicked.

Advanced Level:

  1. Create a button that, when clicked, cycles through three different background colors for a <div>.
  2. Build a simple counter app using innerText, onclick, and a button to increase the count.
  3. Make a toggle button that switches between "Show" and "Hide" for a paragraph by updating innerText and changing display style.