Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Example of CSS visibility property</title> <style> .hidden { visibility: hidden; } .visible { visibility: visible; } div { padding: 20px; background: #ff0000; } span { padding: 15px; background: #00ff00; } </style> </head> <body> <p>This is a paragraph 1.</p> <p class="hidden">This is a paragraph 2.</p> <p>This is a paragraph 3.</p> <div class="hidden"> <strong>Parent</strong> <span class="visible">Children</span> </div> <p><strong>Note:</strong> The invisible element still occupied the space.</p> </body> </html>