একটি উপাদানের প্রদর্শনের ধরন সেট করতে, প্রদর্শন ব্যবহার করুন সম্পত্তি আপনি যদি উপাদানটি লুকিয়ে রাখতে চান তবে কোনটি ব্যবহার করবেন না।
উদাহরণ
জাভাস্ক্রিপ্ট -
এর সাথে একটি উপাদানের প্রদর্শনের ধরন সেট করতে আপনি নিম্নলিখিত কোডটি চালানোর চেষ্টা করতে পারেন
<!DOCTYPE html>
<html>
<head>
<style>
#myID {
width: 250px;
height: 200px;
background-color: green;
}
</style>
</head>
<body>
<button onclick="display()">Set display as none</button>
<div id="myID">
<h1>Heading Level 1 for Demo</h1>
This is Demo Text. This is Demo Text. This is Demo Text. This is Demo Text.
</div>
<script>
function display() {
document.getElementById("myID").style.display = "none";
}
</script>
</body>
</html>