首页 > 其他分享 >HTML 09 - Quotations

HTML 09 - Quotations

时间:2024-05-18 13:29:51浏览次数:13  
标签:used HTML text 09 Example tag Quotations example

 

Quotations in HTML allow you to include and format quoted text within your web content. HTML provides tags such as <blockquote>, <q>, <cite>, <address>, <bdo> and <abbr> to structure and style quotes.

These tags help maintain proper formatting and semantics /sɪˈmæntɪks/, 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.

Quotation tag (<q>)

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.

Syntax

Following is the syntax for the <q> tag.

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

Example

Following is the example program for the <q> tag.

<!DOCTYPE html>
<html>
<head>
   <title>HTML Quotation tag</title>
</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>

 

Example

In the example below, we used <q> tag on a particular text inside the <h1> tag.

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

 

The "<blockquote>" tag

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.

Syntax

Following is the syntax for the <blockquote> tag.

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

Example

Following is the example program for the <blockquote> tag.

<!DOCTYPE html>
<html>
<head>
   <title>HTML blockquote tag</title>
</head>
<body>
   <p>DLF stands for Delhi Land and Finance</p>
   <blockquote>Delhi Land and Finance is one of the largest commercial real estate developers 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 internal business includes the 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>

 

Example

Following is the example program when we use cite attribute inside the <blockquote> tag.

<!DOCTYPE html>
<html>
<head>
   <title>HTML blockquote tag</title>
</head>
<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>

 

Example

Following is the example program when we changed the style of <blockquote> tag by using CSS.

<!DOCTYPE html>
<html>
<head>
   <title>HTML blockquote tag</title>
   <style>
      blockquote {
         margin-left: 0;
      }
   </style>
</head>
<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>

 

The "<cite>" tag

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 −

<!DOCTYPE html>
<html>
<head>
   <title>Cite Tag Example</title>
</head>
<body>
   <p>The information is sourced from <cite>The Elements of Style</cite> by Strunk and White.</p>
</body>
</html>

 

In this example, '<cite>' is used to indicate the title of the referenced book.

 

The "<address>" tag

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 −

<!DOCTYPE html>
<html>
<head>
   <title>Address Tag Example</title>
</head>
<body>
<address>
   Contact us at: <a href="mailto:[email protected]">[email protected]</a><br>
   Visit us at: 123 Main Street, Cityville
</address>
</body>
</html>

 

In this example, the '<address>' tag is used to provide contact information, including an email link and a physical address.

The "<bdo>" tag

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 −

<!DOCTYPE html>
<html>
<head>
   <title>Bi-Directional Override Example</title>
</head>
<body>
   <p>This text will go left to right.</p>
   <p><bdo dir="rtl">This text will go right to left.</bdo></p>
</body>
</html>

 In this example, the text within the '<bdo>' tag is displayed from right to left, overriding the default left-to-right direction.

The "<abbr>" tag

The <abbr> tag in HTML is used to define abbreviations or acronyms. Here's an example −

<!DOCTYPE html>
<html>
<head>
   <title>Abbreviation Tag Example</title>
</head>
<body>
   <p>My best friend's name is <abbr title="Abhishek">Abhy</abbr>.</p>
</body>
</html>

 

In this example, <abbr> is used to abbreviate the name "Abhishek" to "Abhy," and the 'title' attribute provides the full description of the abbreviation.

 

标签:used,HTML,text,09,Example,tag,Quotations,example
From: https://www.cnblogs.com/emanlee/p/18190419

相关文章

  • P10409 「QFOI R2」水落溪流浅浅
    题目传送门一道简单字符串。这道题最简单的方法是使用字符串,但是由于本人不太喜欢使用字符串,所以使用了模拟的方法。首先,你可以根据题意写出如下的代码://「QFOIR2」水落溪流浅浅//codeby:cq_irritater//time:2024/05/04#include<bits/stdc++.h>usingnamespaces......
  • HTML5中 drag 和 drop api
    被拖放元素--A,目标元素--B。dragstart事件主体是A,在开始拖放A时触发。dragend事件主体是A,在整个拖放操作结束时触发。drag事件主体是A,正在拖放A时触发(整个拖拽,drag事件会在被拖拉的节点上持续触发,相隔几百毫秒)。dragenter事件主体是B,在A进入某元素的时候触发。drago......
  • HTML相关知识(二)- Jinja2
    1.for循环{%foriteminmy_list%}是Jinja2模板引擎中的语法,用于在模板中进行循环操作。这里的`my_list`是一个列表,`item`是列表中的每一个元素。在Flaskweb框架中,我们可以在Python代码中定义一个列表,然后将这个列表传递给模板。在模板中,我们可以使用`{%for%}`......
  • Oracle11g-EXP-00091错误
    环境说明oracle11gwin10问题情况在终端中exp导出数据库时,遇到报错“EXP-00091”,按照网上教程修改NLS_LANG但是没有效果。最终原因在power中设置环境变量NLS_LANG的方法与CMD不一样。备注记录先通过服务端查询编码集select*fromnls_database_parameterstwheret.pa......
  • 01-linux核心基础-09文件管理
    文件类型以.开头的文件为隐藏文件NDS配置DNS服务器配置信息1、windows:C:\Windows\System32\drivers\etc\hosts2、linux:/etc/resolv.conf需要记忆变量##1.变量的作用[root@fjh001~]#cathello.shname="隔壁的老张"echo"你好$name"echo"吃了吗$name"ech......
  • wkhtmltopdf.exe HTML转PDF
    wkhtmltopdf.exe下载地址https://wkhtmltopdf.org/ wkhtmltopdf.exe--enable-local-file-access --encoding"UTF-8"--footer-htmlfooter.html file.htmlfile.pdf               可访问本地图文         编码   ......
  • 上百页html生成pdf解决方案(bookjs-easy)简洁完整版(包含接收服务端返回路径参数)
    依靠1:客户端插件 bookjs-easy(点击直接跳转官网)2:服务端插件screenshot-api-server实测105页的pdf,生成耗时40s左右,文件大小16MB项目需求:生成一个上百页的pdf,这个pdf包含表格、折线图、图片等,且横竖幅页面交叉 bookjs-easy官网的文档对于第一次看的人来说并不友好(建议第......
  • C# 去掉字符串中的html 标签,保留指定的标签和属性
    ///<summary>///使用示例///</summary>publicstaticvoidHtmlRemove(){stringrequestBody="<html><head><title>Test</title></head><body><alay-her='123'href=\"https://ex......
  • 在 20nm 提供高性能与集成的 (FPGA) XCVU095-H1FFVA2104E XCVU095-2FFVC2104E XCVU095
    产品优势Virtex™UltraScale™器件在20nm提供高性能与集成,包含串行I/O带宽和逻辑容量。作为在20nm工艺节点的业界仅有高端FPGA,此系列适合从400G网络到大型ASIC原型设计/仿真的应用。应用4x100G转发器400GMAC-InterlakenBridge2x100G复用转发器400GOTN交换......
  • 把markdown文件转换为html文件
    使用pipinstallmarkdown模块只做到了分行;表格,-,和空格还没能无缝转换代码如下:importosimportcodecsimportmarkdowndefconvert_markdown_to_html(markdown_file):withcodecs.open(markdown_file,'r',encoding='utf-8')asfile:markdown_text=fil......