Why this code showing error in W3C validator?
-
26-09-2019 - |
문제
Why this code showing error in W3C validator "character data is not allowed here"
<blockquote>all visible objects, man, are but as pasteboard masks.
But in each event -- in the living act, the undoubted
deed -- there, some unknown but still reasoning thing
puts forth the mouldings of its feature from behind
the unreasoning mask. If man will strike, strike
through the mask. All visible objects, man, are but as pasteboard masks.
But in each event -- in the living act, the undoubted
deed -- there, some unknown but still reasoning thing
puts forth the mouldings of its feature from behind
the unreasoning mask. If man will strike, strike
through the mask.</blockquote>
It does not giving any error in this validator http://www.onlinewebcheck.com/
해결책
A blockquote
is not supposed to directly contain text. You'll need to wrap your text in a single p
tag or series of p
tags before it'll validate.
다른 팁
You can't put text inside a <blockquote>
tag. You have to wrap it in another element such as a <p>
tag:
<blockquote>
<p>My text.</p>
</blockquote>
Note: To validate a blockquote element as strict HTML/XHTML, the element must contain only other block-level elements, like this:
<blockquote> <p>Here is a long quotation here is a long quotation</p> </blockquote>
Source: w3schools.com
제휴하지 않습니다 StackOverflow