Thẻ HTML <blockquote>
Định nghĩa và cách sử dụng
Thẻ <blockquote>
chỉ định một phần được trích dẫn từ một nguồn khác.
<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>
Trình duyệt thường thụt lề các phần tử <blockquote>
(xem ví dụ bên dưới để biết cách loại bỏ thụt lề).
Mẹo và lưu ý
Mẹo: Sử dụng <q>
cho các trích dẫn nội dòng (ngắn).
Hỗ trợ trình duyệt
Phần tử <blockquote> | Google Chrome | MS Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Có | Có | Có | Có | Có |
Thuộc tính
Thuộc tính | Giá trị | Mô tả |
---|---|---|
cite | URL | Chỉ định nguồn trích dẫn |
Thuộc tính Global
Thẻ <blockquote>
cũng hỗ trợ các thuộc tính Global trong HTML.
Thuộc tính sự kiện
Thẻ <blockquote>
cũng hỗ trợ thuộc tính sự kiện trong HTML.
Các ví dụ khác
Sử dụng CSS để loại bỏ thụt lề khỏi phần tử 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>
Cài đặt CSS mặc định
Hầu hết mọi trình duyệt sẽ hiển thị phần tử <blockquote>
với các giá trị mặc định sau:
blockquote {
display: block;
margin-top: 1em;
margin-bottom: 1em;
margin-left: 40px;
margin-right: 40px;
}
433
0 Bình luận
Sắp xếp theo

Xóa Đăng nhập để Gửi
Bạn nên đọc
