Master the commonly used HTML tags for quoting content in web pages

Master the commonly used HTML tags for quoting content in web pages

Use blockquote for long citations, q for short citations, and cite for references. In practice, only blockquote and q are usually used.
According to the HTML specification, there are three elements for quoting content, namely <blockquote> <q> <cite>. In reality, these tags are rarely used, so when you do apply them, which tags should you use? You have to be very familiar with their semantics.
<blockquote>
A blockquote is a quotation of content. The content must include block-level elements such as headings, lists, paragraphs, or div tags. This element can also have an optional attribute cite that specifies the location (in the form of a URI). For example:
<blockquote cite="https://www.jb51.net/reference/htmltags/blockquote/">
<p>A large quotation. The content of a blockquote element must include block-level elements such as headings, lists, paragraphs or div's.</p>
<p>cite can be used to specify the location (in the form of a URI) where the quote has come from.</p>
</blockquote>
<q>
The <q> tag defines a short quote. The <q> tag is essentially the same as a <blockquote>. The difference lies in their display and application. The <q> tag is used for short inline quotations.
Bob said <q>sexy pyjamas</q> but Chris said <q>a kimono</q>
Although <q> is almost never used, it has some useful properties. For example, you can specify the appearance of the <q> quotation mark symbol through CSS. This is allowed
Q {}
Q {quotes: '»' '«' }
Q {quotes: '„' '“'}
It seems good, but it is not supported by the entire IE series, not even the latest IE8. Huge embarrassing~~
<cite>
Use this tag to define a reference, such as a book or journal title. For example:
<p>And <cite>Bob</cite> said <q>No, I think it's a banana</q>.</p>
Summarize:
Use <blockquote> for long citations, <q> for short citations, and <cite> for references. In practice, only <blockquote> and <q> are usually used.

<<:  Detailed explanation of the use of the clip-path property in CSS

>>:  Issues installing Python3 and Pip in ubuntu in Docker

Recommend

Detailed explanation of the relationship between React and Redux

Table of contents 1. The relationship between red...

Mysql tree-structured database table design

Table of contents Preface 1. Basic Data 2. Inheri...

How to connect XShell and network configuration in CentOS7

1. Linux network configuration Before configuring...

Importance of background color declaration when writing styles

As the title says, otherwise when the page is revi...

Detailed tutorial on installing Protobuf 3 on Ubuntu

When to install If you use the protoc command and...

Detailed Example of MySQL curdate() Function

MySQL CURDATE Function Introduction If used in a ...

How to remotely connect to MySQL database with Navicat Premium

The party that creates a new connection is equiva...

Pure CSS to modify the browser scrollbar style example

Use CSS to modify the browser scroll bar style ::...

Canonical enables Linux desktop apps with Flutter (recommended)

Google's goal with Flutter has always been to...

The viewport in the meta tag controls the device screen css

Copy code The code is as follows: <meta name=&...

Overview and Introduction to Linux Operating System

Table of contents 1. What is an Operating System ...

How is a SQL statement executed in MySQL?

Table of contents 1. Analysis of MySQL architectu...

Tutorial on installing MySQL 5.7.18 decompressed version on Windows

1. Installation process MySQL version: 5.7.18 1. ...