In this video tutorial, I am going to show you how to toggle between hiding and showing an HTML element using just JavaScript and CSS on click a button. You can use OnClick event on the button to trigger a function that will show or hide the div or show or hide the element when button is clicked.
Timestamps:
0:00 Intro
2:16 Show div on click of button
5:40 Hide div on click of button