如何在 HTML 中使用 blockquote?


<blockquote> 标签用于标示长引文。它应当只包含块级元素,而不仅仅是普通文本。它指定从其他来源引用的部分,并且只包含块级元素。

我们还可以在 <blockquote> 标签内使用 cite 属性以 URL 形式指示引文来源。

语法

以下是 <blockquote> 标签的语法。

<blockquote>The multiple line content to be quoted </blockquote>

示例

以下是 <blockquote> 标签的示例程序。

<!DOCTYPE html> <html> <head> </head> <body> <p>DLF stands for Delhi Land and Finance</p> <blockquote>Delhi Land and Finance is one of the largest commercial real estate developer in India.It is also engaged in the business of generation of power provision of maintenance services hospitality and recreational activities life insurance and retail chain outlets. Its internalbusiness includes development business and rental business. The development business of the Company is involved in the sale of residential spaces select commercial offices and commercial complexes. The company has a unique business model with earnings arising from development and rentals.</blockquote> </body> </html>

示例

以下是当我们在 <blockquote> 标签内使用 cite 属性时的示例程序。

<!DOCTYPE html> <html> <head> <title>HTML blockquote tag</title> </head> <body> <h1>Drupal</h1> <p>Here is a quotation from Drupal’s official website</p> <blockquote cite="http://drupal.org">The Drupal project is open source software. Anyone can download, use, work on, and share it with others. It's built on principles like collaboration, globalism, and innovation.</blockquote> </body> </html>

示例

以下是当我们使用 CSS 更改 <blockquote> 标签的样式时的示例程序。

<!DOCTYPE html> <html> <head> <title>HTML blockquote tag</title> <style> blockquote { margin-left: 0; } </style> </head> <body> <h1>Drupal</h1> <p>Here is a quotation from Drupal’s official website</p> <blockquote cite="http://drupal.org">The Drupal project is open source software. Anyone can download, use, work on, and share it with others. It's built on principles like collaboration, globalism, and innovation.</blockquote> </body> </html>

更新时间:11-Nov-2022

543 次浏览

开启你的职业生涯

完成课程以获得认证

开始
广告
© . All rights reserved.