开发者

Why is blockquote element not inheriting parent p's styles?

I have very very simple HTML:

<p>
<blockquote>
</blockquote
</p>

The p element has a rule in an external stylesheet to define the font-family and co开发者_Go百科lor, yet when the blockquote is inside the p, the blockquote is not inheriting any of the p's styles. This is in IE 9.

Why is this?


You cannot have a blockquote inside a paragraph.

Since the end tag for a paragraph is optional, the following means:

<p>            <!-- Start paragraph -->
<blockquote>   <!-- Blockquote forbidden inside p. End paragraph. Start blockquote -->
</blockquote>  <!-- End blockquote -->
</p>           <!-- End paragraph. Paragraph not open. Error. Ignore. -->
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜