Specifies whether the element is visible.
This property is useful if you want to hide or show the contents of an element. Similar to display property, but if you set the visibility property to 'hidden', only the contents of the element will be invisible, the element stays in its original position and size. The display property with value 'none' hides the entire element.
One of the following values:
|If used on cell elements, 'collapse' has the same meaning as 'hidden'.|
|Element is hidden.|
|Takes the value of this property from the computed style of the parent element.|
|Element is visible.|
Example HTML code 1:
This example illustrates the use of the visibility property:
Did you find this example helpful?
Supported by tags:
User Contributed Comments