Controlling Element Visibility - HTML

You can use the visibility property to control whether an element is visible or not. The visibility property has the following format:

visibility: visible | hidden | collapse;

The visible and hidden values are fairly self-explanatory—set to visible (default), an element is rendered; set to hidden, the element is not rendered. Note Even though an element is hidden with visibility, set to hidden it will still affect the layout—space for the element is still reserved in the layout.

Changing an element’s z-index changes its position in the stack.

Changing an element’s z-index changes its position in the stack.

The collapse value causes an element with rows or columns to collapse its borders. If the element does not have rows or columns, this value is treated the same as hidden.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

HTML Topics