CSS display: none
display: none প্রোপার্টি এলিমেন্ট ডিলিট না করেই লুকাতে ব্যবহৃত হয়। এটি কোনো স্পেস নেয় না।
<!DOCTYPE html> <html> <head> <style> h3 { display: none; } </style> </head> <body> <h2>This heading is visible</h2> <h3>This is a hidden heading</h3> <p>The hidden heading does not take up space even after hiding it since we have used display: none;.</p> </body> </html>CSS visibility: hidden
visibility: hidden প্রোপার্টিও এলিমেন্ট লুকায়, কিন্তু লেআউটে প্রভাব ফেলে অর্থাৎ স্পেস নেয়। উদাহরণ দেখুন:
<!DOCTYPE html> <html> <head> <style> h3 { visibility: hidden; } </style> </head> <body> <h2>This heading is visible</h2> <h3>This is a hidden heading</h3> <p>The hidden heading takes up space even after hiding it.</p> </body> </html>