DEV Community

Cover image for My JavaScript DOM Mini Projects
Ezhil Abinaya K
Ezhil Abinaya K

Posted on

My JavaScript DOM Mini Projects

JavaScript DOM Mini Projects
I completed four beginner-friendly mini projects. These projects helped me understand how JavaScript interacts with HTML elements and updates the webpage dynamically without refreshing it.
1. Change Text on Button Click
In this project, I learned how to access HTML elements using getElementById() and change their content using the innerText property. When the button is clicked, the text changes dynamically.
Concepts Learned:

  • document.getElementById()
  • innerText
  • onclick event

2. Light ON/OFF Toggle
This project simulates a light bulb that turns ON and OFF when the button is clicked. I used a Font Awesome light bulb icon and changed its color using JavaScript.

Concepts Learned:

  • style.color
  • if...else
  • DOM element manipulation
  • Event handling

3. Counter App
The Counter App increases, decreases, and resets a number displayed on the screen.It updating the DOM whenever the counter value changes.

Concepts Learned:

  • Variables (let)
  • Increment (++) and Decrement (--)
  • innerText
  • Functions

4. Live Character Counter
In this project, the number of characters typed inside a textarea is counted instantly. The count updates every time the user types.
Concepts Learned:

  • value
  • length
  • onkeyup event
  • Live DOM updates

What I Learned
These four mini projects strengthened my understanding of JavaScript DOM fundamentals. I learned how to:

  • Select HTML elements using getElementById()
  • Handle button and keyboard events
  • Modify text and styles dynamically
  • Use conditional statements (if...else)
  • Work with variables and functions
  • Read user input using value
  • Count characters using length

These projects are small, but they build a strong foundation for creating interactive web applications.

Top comments (0)