The CSS visibility property is used to specify whether an element is visible or hide.
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
The visibility property can take the following values −
visible : It is default value. It specifies that the element is visible.
hidden : It specifies that the element is invisible (but still takes up space).
collapse : It is used only for table elements. It is used to remove a row or column, but it does not affect the table layout.
Example : CSS - Visibility
<!DOCTYPE html>
<html>
<head>
<style>
h3 {
visibility: visible;
}
p {
visibility: hidden;
}
</style>
</head>
<body>
<p>code always.</p>
<h3>Code Always To Become Best Programmer.</h3>
<h4 style = "visibility:hidden;" >code now.</h4>
</body>
</html>
When the above code is compiled , it produces the following result.
Result
Code Always To Become Best Programmer.