Html 简明教程
HTML - Quotations
HTML 中的引号允许你在 Web 内容中包含并设置引文文本的格式。这些用于引用任何句子或关键字,有一系列用于创建引用的标签。
Quotations in HTML allow you to include and format quoted text within your web content. These are used to quote any sentence or keyword, there are list of tags that are used to create quotation.
这些标签有助于维护适当的格式和语义,从而增强引文内容在网页上的呈现和含义。准确传达信息并在良好的组织中为用户提供阅读体验,因此纳入引用至关重要。
These tags help maintain proper formatting and semantics, enhancing the presentation and meaning of quoted content on web pages. Incorporating quotes is essential for conveying information accurately and providing a well-organized reading experience for users.
HTML Quotation Tags List
-
HTML <q> Tag
-
HTML <blockquote> Tag
-
HTML <cite> Tag
-
HTML <address> Tag
-
HTML <bdo> Tag
-
HTML <abbr> Tag
下面我们为引文使用了每个标记,每个标记都有其默认样式,其中一些标记接受一些属性,但我们未使用任何属性来更改其默认样式。
Below we have used each tag for quotation, each tag has it’s default styling few of them accepts some attributes but we did not use any attribute to change it’s default style.
HTML "<q>" for Quotations
我们使用 * <q>* 标记在 HTML 中添加短引号。而如果我们要引用多行,请使用 <blockquote> 标记。我们还可以在 <blockquote> 标记内使用 cite 属性以 URL 形式指示引用的来源。
We use <q> tag, to add short quotation marks in HTML. And if we want to quote for multiple lines, use <blockquote> tag. We can also use the cite attribute inside the <blockquote> tag to indicate the source of the quotation in URL form.
HTML "<blockquote>" for Quotations
-
<blockquote>* 标记用于表示长引文。它应该只包含其中的块级元素,而不仅仅是纯文本。它指定从另一个来源引用的部分,并且只包含块级元素。我们还可以在 <blockquote> 标记内使用 cite 属性以 URL 形式指示引用的来源。
The <blockquote> tag is to indicate long quotations. It should contain only block-level elements within it and not just plain text. It specifies a section quoted from another source and contains only block-level elements. We can also use the cite attribute inside the <blockquote> tag to indicate the source of the quotation in URL form.
Example 1
<!DOCTYPE html>
<html>
<body>
<p>
About Tutorialspoint
</p>
<blockquote>
Tutorialspoint originated from the idea that there exists
a class of readers who respond better to online content and
prefer to learn new skills at their own pace from the comforts
of their drawing rooms.
</blockquote>
</body>
</html>
Output
About Tutorialspoint
Tutorialspoint originated from the idea that there exists a class of readers who respond
better to online content and prefer to learn new skills at their own pace from the comforts
of their drawing rooms.
Example 2
<!DOCTYPE html>
<html>
<body>
<h1>Tutorialspoint</h1>
<p>
Here is a quotation from Tutorialspoint’s official website
</p>
<blockquote cite="https://www.tutorialspoint.com">
Join our millions of loyal visitors to access our free Text Library.
From programming languages and web development to data science and
cybersecurity, our masterfully crafted Tutorials will help you master
any technology or concept from scratch.
</blockquote>
</body>
</html>
Output
Here is a quotation from Tutorialspoint’s official website
Join our millions of loyal visitors to access our free Text Library. From programming languages
and web development to data science and cybersecurity, our masterfully crafted Tutorials will
help you master any technology or concept from scratch.
HTML "<cite>" for Quotations
HTML 中的 * <cite>* 标记用于在内容中引用创意作品的标题,例如书籍、电影或歌曲。它为引文提供了语义含义。以下是一个编码示例 −
The <cite> tag in HTML is used to reference the title of a creative work, such as a book, movie, or song, within the content. It provides semantic meaning to the citation. Here’s a coding example −
HTML "<address>" for Quotations
-
<address>* 标记在 HTML 中用于定义文档的作者或所有者的联系信息。它通常包括诸如电子邮件地址、物理地址或其他相关联系信息之类的详细信息。这是一个示例 −
The <address> tag in HTML is used to define the contact information for the author or owner of a document. It often includes details such as an email address, physical address, or other relevant contact information. Here’s an example −
HTML "<bdo>" for Quotations
HTML 中的 * <bdo>* 标签, bdo 代表双向覆盖,用于覆盖当前文本方向。它通常用于需要更改默认文本方向的情况,例如,从右至左显示文本。示例如下:
The <bdo> tag in HTML, bdo stands for Bi-Directional Override, is used to override the current text direction. It is commonly used in situations where the default text direction needs to be changed, such as for displaying text from right to left. Here’s an example −
HTML "<abbr>" for Quotations
HTML 中的 * <abbr>* 标签用于定义缩写或首字母缩写词。在此示例中, <abbr> 用于将“Abhishek”缩写为“Abhy”,而“title”属性提供了缩写的完整描述。
The <abbr> tag in HTML is used to define abbreviations or acronyms. In this example, <abbr> is used to abbreviate the name "Abhishek" to "Abhy," and the 'title' attribute provides the full description of the abbreviation.