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

Pure CSS to achieve automatic rotation effect of carousel banner

Without further ado, let’s get straight to the co...

React Native JSI implements sample code for RN and native communication

Table of contents What is JSI What is different a...

How to deal with too many Docker logs causing the disk to fill up

I have a server with multiple docker containers d...

How to install redis in docker and set password and connect

Redis is a distributed cache service. Caching is ...

Semantics: Is Html/Xhtml really standards-compliant?

<br />Original text: http://jorux.com/archiv...

Implementation of Docker batch container orchestration

Introduction Dockerfile build run is a manual ope...

JavaScript history object explained

Table of contents 1. Route navigation 2. History ...

Example code for implementing triangles and arrows through CSS borders

1. CSS Box Model The box includes: margin, border...

Ubuntu opens port 22

Scenario You need to use the xshell tool to conne...

MySQL 8.0 New Features - Introduction to the Use of Management Port

Table of contents Preface Connection Management A...

Methods and techniques for quickly displaying web page images

1. Use .gifs rather than .jpgs. GIFs are smaller ...

Analyzing the MySql CURRENT_TIMESTAMP function by example

When creating a time field DEFAULT CURRENT_TIMEST...

Implementation methods of common CSS3 animations

1. What is CSS Animations is a proposed module fo...