hide and show div tag in JS
** Setting the display property of an element only changes how the element is displayed , NOT what kind of element it is. So, an inline element with display: block; is not allowed to have other block elements inside it. The display property is used to specify how an element is shown on a web page. Every HTML element has a default display value, depending on what type of element it is. The default display value for most elements is block or inline . The display property is used to change the default display behavior of HTML elements. display: none; is commonly used with JavaScript to hide and show elements without deleting and recreating them. visibility:hidden; also hides an element. However, the element will still take up the same space as before. The element will be hidden, but still affect the layout: Example h1.hidden { visibility : hidden ; } <!DOCTYPE htm...