ข้อมูลอ้างอิงHTML

HTML โดยตัวอักษร HTML ตามหมวดหมู่ รองรับ HTML Browser แอตทริบิวต์ HTML HTML Global Attributes เหตุการณ์ HTML HTML สี HTML Canvas HTML เสียง/วิดีโอ ชุดอักขระ HTML HTML Doctypes การเข้ารหัส URL HTML รหัสภาษา HTML รหัสประเทศ HTML ข้อความ HTTP วิธี HTTP ตัวแปลง PX เป็น EM แป้นพิมพ์ลัด


HTML <กัน>แท็ก


ตัวอย่าง

แสดงเนื้อหาบางส่วนนอกเหนือจากเนื้อหาที่อยู่ใน:

<p>My family and I visited The Epcot center this summer. The weather was nice, and Epcot was amazing! I had a great summer together with my family!</p>

<aside>
<h4>Epcot Center</h4>
<p>Epcot is a theme park at Walt Disney World Resort featuring exciting attractions, international pavilions, award-winning fireworks and seasonal special events.</p>
</aside>

ตัวอย่าง "ลองใช้เอง" เพิ่มเติมด้านล่าง


ความหมายและการใช้งาน

แท็ ก<aside>กำหนดเนื้อหาบางส่วนนอกเหนือจากเนื้อหาที่วางอยู่

เนื้อหาด้านข้างควรเกี่ยวข้องทางอ้อมกับเนื้อหาโดยรอบ

เคล็ดลับ:เนื้อหา<aside>มักจะถูกวางเป็นแถบด้านข้างในเอกสาร

หมายเหตุ:องค์ประกอบ<aside>นี้จะไม่แสดงผลเป็นพิเศษในเบราว์เซอร์ อย่างไรก็ตาม คุณสามารถใช้ CSS เพื่อจัดรูปแบบ<aside> องค์ประกอบ (ดูตัวอย่างด้านล่าง)


รองรับเบราว์เซอร์

ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนองค์ประกอบอย่างสมบูรณ์

Element
<aside> 6.0 9.0 4.0 5.0 11.1

คุณสมบัติสากล

แท็ ก<aside>ยังสนับสนุน Global Attributes ในHTML


คุณสมบัติของเหตุการณ์

แท็ ก<aside>ยังสนับสนุนแอตทริบิวต์เหตุการณ์ใน HTML



ตัวอย่างเพิ่มเติม

ตัวอย่าง

ใช้ CSS เพื่อจัดรูปแบบ <aside> องค์ประกอบ:

<html>
<head>
<style>
aside {
  width: 30%;
  padding-left: 15px;
  margin-left: 15px;
  float: right;
  font-style: italic;
  background-color: lightgray;
}
</style>
</head>
<body>

<h1>The aside element</h1>

<p>My family and I visited The Epcot center this summer. The weather was nice, and Epcot was amazing! I had a great summer together with my family!</p>

<aside>
<p>The Epcot center is a theme park at Walt Disney World Resort featuring exciting attractions, international pavilions, award-winning fireworks and seasonal special events.</p>
</aside>

<p>My family and I visited The Epcot center this summer. The weather was nice, and Epcot was amazing! I had a great summer together with my family!</p>
<p>My family and I visited The Epcot center this summer. The weather was nice, and Epcot was amazing! I had a great summer together with my family!</p>

</body>
</html>

หน้าที่เกี่ยวข้อง

การอ้างอิง HTML DOM: Aside Object


การตั้งค่า CSS เริ่มต้น

เบราว์เซอร์ส่วนใหญ่จะแสดง<aside>องค์ประกอบด้วยค่าเริ่มต้นดังต่อไปนี้:

aside {
  display: block;
}