如何在 HTML 中使用引号?


我们在 HTML 中使用 <q> 标签来添加短引号。如果我们想引用多行,请使用 <blockquote> 标签。

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

语法

下面是 <q> 标签的语法。

<q>The content to be quoted</q>

示例

下面是 <q> 标签的示例程序。

<!DOCTYPE html> <html> <head> </head> <body> <p>DLF stands for <q>Delhi Land and Finance</q></p> <p>Delhi Land and Finance is one of the largest commercial real estate developer in India.</p> </body> </html>

示例

在下例中,我们在 <h1> 标签中的特定文本上使用了 <q> 标签。

<!DOCTYPE html> <html> <head> <title>HTML u tag</title> </head> <body> <h1>Welcome to <q> INDIA </q> Kids.</h1> </body> </html>

使用 Blockquote 标签

HTML 中的 <blockquote> 标签用于显示长引文。

语法

下面是 <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.</blockquote> </body> </html>

更新于: 11-11-2022

5K+ 查看

开启您的 职业

完成课程以获得认证

开始
广告
© . All rights reserved.