<br />Semanticization cannot be explained in just a few words, and there is no official and strict definition yet. What is not controversial about <blockquote> is: 1. Quote a longer text 2. Can I use the cite tag or attribute? The question is, does the quoted text in <blockquote> have to be contained by a block-level element? First, the explanation from W3C 9.2.2 Quotations: The BLOCKQUOTE and Q elements<!ELEMENT BLOCKQUOTE - - (%block;|SCRIPT) -- long quotation --><!ATTLIST BLOCKQUOTE %attrs; -- %coreattrs, %i18n, %events -- cite %URI; #IMPLIED -- URI for source document or msg -- ><!ELEMENT Q - - (%inline;)* -- short inline quotation --><!ATTLIST Q %attrs; -- %coreattrs, %i18n, %events -- cite %URI; #IMPLIED -- URI for source document or msg -- > These two notes indicate that the content contained is a quoted text. BLOCKQUOTE is used for long quoted text (block-level content) and Q is used for short quoted text (inline content) and does not allow incomplete quoted sentences. This example uses text from "The Two Towers", by JRR Tolkien, as the most commonly quoted text. <BLOCKQUOTE cite="http://www.mycom.com/tolkien/twotowers.html"><P>They went in single file, running like hounds on a strong scent,and an eager light was in their eyes. Nearly due west the broad swath of the marching Orcs tramped its ugly slot; the sweet grass of Rohan had been bruised and blackened as they passed.</P></BLOCKQUOTE> This article is developed using web standards and mentions the semantics of some tags. The following is an excerpt from <blockquote> For longer quotations that form one or more paragraphs, the <blockquote> element should be used. CSS can then be used to style the quotation. Note that text is not allowed directly inside a <blockquote> element – it must be contained in an element, usually a <p> element. Example: <blockquote cite="http://www.w3.org/TR/1999/REC-html401-19991224/struct/text.html"> <p>“The following sections discuss issues surrounding the structuring of text. Elements that present text (alignment elements, font elements, style sheets, etc.) are discussed elsewhere in the specification. For information about characters, please consult the section on the document character set.”</p></blockquote> http://24ways.org/advent/transitional-vs-strict-markup This article is about transitional-vs-strict, the difference between transitional and standard XHTML, and the difference in content models. Regarding <blockquote>, in strict, the quoted content must be contained in a block-level element, usually <p> or <div>. Content model differences An element type's content model describes what may be contained by an instance of the element type. The most important difference in content models between Transitional and Strict is that blockquote, body, and form elements may only contain block level elements. A few examples: text and images are not allowed immediately inside the body element, and need to be contained in a block level element like p or div input elements must not be direct descendants of a form element text in blockquote elements must be wrapped in a block level element like p or div Therefore, I think that in strict type, block-level elements must be used to contain quoted text, but in non-strict type, it is not necessary. However, it is recommended to do so because strict documents are stricter and can be regarded as backward compatible. |
<<: Docker uses CMD or ENTRYPOINT commands to start multiple services at the same time
>>: jQuery plugin to implement accordion secondary menu
Downloaded the unzipped version of mysql-5.6.37-w...
There are two versions of MySQL database manageme...
Debug branch During the normal development of a p...
Most of the time, plug-ins are used to upload fil...
cause I recently started to refactor the project,...
Table of contents 1. Installation 2. There is no ...
Table of contents Dockerfile pom.xml Jenkins Conf...
This article hopes to gain some insights through a...
Written in front There are two ways to upgrade My...
mysql returns Boolean type In the first case, ret...
1. Achieve the effect 2 Knowledge Points 2.1 <...
Without further ado, I will post the code for you...
1. Introduction When we log in to MySQL, we often...
Find the problem Recently, I encountered a proble...
Copy code The code is as follows: <html xmlns=...