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

How to view the storage location of MySQL data files

We may have a question: After we install MySQL lo...

Solution for Baidu site search not supporting https (tested)

Recently, https has been enabled on the mobile ph...

Solution for mobile browsers not supporting position: fix

The specific method is as follows: CSS Code Copy ...

Detailed explanation of mixed inheritance in Vue

Table of contents The effect of mixed inheritance...

The whole process of installing and configuring Harbor1.7 on CentOS7.5

1. Download the required packages wget -P /usr/lo...

Analyze several common solutions to MySQL exceptions

Table of contents Preface 1. The database name or...

How to embed flash video format (flv, swf) files in html files

Flash file formats: .FLV and .SWF There are two ex...

Discussion on the problem of iframe node initialization

Today I suddenly thought of reviewing the producti...

Solution to the problem that MySQL commands cannot be entered in Chinese

Find the problem Recently, when I connected to th...

Docker's flexible implementation of building a PHP environment

Use Docker to build a flexible online PHP environ...

Implementation of vue+drf+third-party sliding verification code access

Table of contents 1. Background 2. Verification p...

Use of Vue filters and custom instructions

Table of contents Filters 01.What is 02. How to d...

Simple implementation method of vue3 source code analysis

Table of contents Preface 🍹Preparation 🍲vue3 usag...

MySQL scheduled full database backup

Table of contents 1. MySQL data backup 1.1, mysql...