The visibility property determines whether an element is visible or hidden.This property specifies whether an element is visible-that is, whether the box(es) that are generated by an element are rendered.A property called visibility allows you to hide an element from view. You can use this property alongwith Javascript to create very complex menu and very complex webpage layouts.
You may choose to use the visibility property to hide error messages that are only displayed if the user needs to see them, or to hide answers to a quiz until the user selects an option.
The CSS visibility property can take the values listed in given below:
p.visible {
visibility:visible;
}
p.hidden {
visibility:hidden;
}
p.collapes {
visibility:collapse;
}
p.inherit {
visibility:inherit;
}
<html>
<head>
<style>
p.collapes {
visibility:collapse;
}
p.hidden {
visibility:hidden;
}
p.inherit {
color:#0033FF;
visibility:inherit;
}
p.visible {
color:#0033ff;
visibility:visible;
}
</style>
</head>
<body>
<p class="collapes">this is used to show collapes property</p>
<p class="hidden">this is used to show hidden property</p>
<p class="inherit">this is used to show inherit property</a>
<p class="visible">this is used to show visible property</a>
</body>
</html>
Output
Others
Languages
Frameworks
Web / Design
Mobile Technology
Sql & Technology
R4R