แอตทริบิวต์ HTML open กำหนด รายละเอียด เนื้อหาองค์ประกอบ HTML ควรมองเห็นได้ (เปิด) ในเอกสาร HTML
ไวยากรณ์
ต่อไปนี้เป็นไวยากรณ์ -
<details open></details>
ให้เรามาดูตัวอย่าง HTML open Attribute −
ตัวอย่าง
<!DOCTYPE html>
<html>
<style>
body {
color: #000;
height: 100vh;
background-color: #8BC6EC;
background-image: linear-gradient(135deg, #8BC6EC 0%, #9599E2 100%);
text-align: center;
}
</style>
<body>
<h1>HTML low Attribute Demo</h1>
<details open>
<summary>Hi! I'm a summary element</summary>
<p>Hi! I'm a paragraph element with some dummy text</p>
</details>
</body>
</html> ผลลัพธ์
