andin HTML
andin HTML
Tag defines blockQuote;tag defines a short quote, and browsers often add quotation marks around the quoted content. Thetag is essentially the same asbut differs in their display and application. Thetag 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 thetag.1.
tag1. 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 thetag, 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 login2.
tag1. Definition and usage
tag defines a block quote. All text betweenandwill 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 login4, 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 login3. The difference between
and1. The
tag is essentially the same as. The difference lies in their display and application. Thetag is used for brief inline quotes. If you need to separate a longer section from surrounding content (usually shown as an indented block), use thetag.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. Thetag is essentially the same as. The difference lies in their display and application. Thetag is used for brief inline quotes.The
tag is essentially the same as. The difference lies in their display and application. Thetag is used for brief inline quotations. If you need to separate a longer section from surrounding content (usually shown as an indented block), use thetag.The above is the detailed content of A detailed introduction to the difference between
andin HTML. For more information, please follow other related articles on the PHP Chinese website!