HTML <blockquote>แท็ก
ตัวอย่าง
ส่วนที่ยกมาจากแหล่งอื่น:
<blockquote cite="http://www.worldwildlife.org/who/index.html">
For 50 years, WWF has been protecting the future of nature. The world's leading conservation organization, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally.
</blockquote>
ตัวอย่าง "ลองใช้เอง" เพิ่มเติมด้านล่าง
ความหมายและการใช้งาน
แท็ ก<blockquote>
ระบุส่วนที่อ้างอิงจากแหล่งอื่น
เบราว์เซอร์มักจะเยื้อง<blockquote>
องค์ประกอบ (ดูตัวอย่างด้านล่างเพื่อดูวิธีลบการเยื้อง)
เคล็ดลับและหมายเหตุ
เคล็ดลับ:ใช้<q>
สำหรับใบเสนอราคาแบบอินไลน์ (แบบสั้น)
รองรับเบราว์เซอร์
Element | |||||
---|---|---|---|---|---|
<blockquote> | Yes | Yes | Yes | Yes | Yes |
คุณลักษณะ
Attribute | Value | Description |
---|---|---|
cite | URL | Specifies the source of the quotation |
คุณสมบัติสากล
แท็ ก<blockquote>
ยังสนับสนุน Global Attributes ในHTML
คุณสมบัติของเหตุการณ์
แท็ ก<blockquote>
ยังสนับสนุนแอตทริบิวต์เหตุการณ์ใน HTML
ตัวอย่างเพิ่มเติม
ตัวอย่าง
ใช้ CSS เพื่อลบการเยื้องออกจากองค์ประกอบ blockquote:
<html>
<head>
<style>
blockquote {
margin-left: 0;
}
</style>
</head>
<body>
<p>Here is a quote from WWF's
website:</p>
<blockquote
cite="http://www.worldwildlife.org/who/index.html">
For 50 years, WWF has
been protecting the future of nature. The world's leading conservation
organization, WWF works in 100 countries and is supported by 1.2 million
members in the United States and close to 5 million globally.
</blockquote>
</body>
</html>
หน้าที่เกี่ยวข้อง
การอ้างอิง HTML DOM: Blockquote Object
การตั้งค่า CSS เริ่มต้น
เบราว์เซอร์ส่วนใหญ่จะแสดง<blockquote>
องค์ประกอบด้วยค่าเริ่มต้นดังต่อไปนี้:
ตัวอย่าง
blockquote {
display: block;
margin-top: 1em;
margin-bottom: 1em;
margin-left: 40px;
margin-right: 40px;
}