Home > Web Front-end > HTML Tutorial > A detailed introduction to the difference between
and in HTML

A detailed introduction to the difference between
and in HTML

黄舟
Release: 2017-06-20 11:29:10
Original
2255 people have browsed it

Tag defines blockQuote; tag defines a short quote, and browsers often add quotation marks around the quoted content. The tag is essentially the same as
but differs in their display and application. The tag is used for short inline quotes, and if you need to separate a longer section from the surrounding content (usually shown as an indented block), use the
tag.

1. tag

1. Definition and usage

tag defines a short reference.

Browsers often add quotation marks around quoted content.

2. Browser support

All browsers support the tag.

3. Tips

According to the HTML 4.01 specification, the q element should be rendered using delimited quotation marks. That is to say, the text contained in the q element must start and end with quotation marks. Mozilla browsers (Firefox) and Opera comply with this rule, but Internet Explorer does not. As a result, if you want to use the tag and satisfy Internet Explorer with its own quotes, you will have to use two sets of quotes in a standards-compliant browser. Nonetheless, we recommend using the tag, not just because we like the standard, but also because we foresee the visual effects of its application in document processing, information extraction, and more.

4. Example

<html>
<body>
<p>Here comes a short quotation: <q>This is a short quotation</q>
</p>
<p>请注意,浏览器在引用的周围插入了引号。</p>
</body>
</html>
Copy after login

2.

tag

1. Definition and usage

tag defines a block quote. All text between

and
will be separated from the regular text, often indented on the left and right sides (increased margins) , and sometimes italics are used. That is, block references have their own space.

2. Browser support

All mainstream browsers support the

tag.

Note: No browser displays the cite attribute correctly.

3. Tips

Please use the q element to mark short quotes.

Note: If you need to validate the page as strict XHTML, the

element must contain block-level elements, such as this:

<blockquote>
<p>here is a long quotation here is a long quotation</p>
</blockquote>
Copy after login

4, Example

<html>
<body>Here comes a long quotation:<blockquote>
This is a long quotation. 
This is a long quotation. This is a long quotation. 
This is a long quotation. This is a long quotation.
</blockquote>请注意,浏览器在 blockquote 元素前后添加了换行,并增加了外边距。
</body>
</html>
Copy after login

3. The difference between and

1. The tag is essentially the same as

. The difference lies in their display and application. The tag is used for brief inline quotes. If you need to separate a longer section from surrounding content (usually shown as an indented block), use the
tag.

2. If you use the blockquote element, the browser will insert line breaks and margins, but the q element will not have any special rendering.

3. Lockquote is a reference to the content. Content must include block-level elements such as headings, lists, paragraphs or p tags, generally used for long paragraph quotes. This element can also have an optional attribute cite specifying the location (in the form of a URI)

4. The tag can define a short reference. The tag is essentially the same as

. The difference lies in their display and application. The tag is used for brief inline quotes.

The tag is essentially the same as

. The difference lies in their display and application. The tag is used for brief inline quotations. If you need to separate a longer section from surrounding content (usually shown as an indented block), use the
tag.

The above is the detailed content of A detailed introduction to the difference between

and in HTML. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template