可以嵌套在P元素中的HTML5元素列表? [英] List of HTML5 elements that can be nested inside P element?

查看:126
本文介绍了可以嵌套在P元素中的HTML5元素列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找出所有可嵌套在段落元素内的有效HTML5元素,以便w3验证器不显示任何错误。我的意思是我试图在下面的代码中找出可以替换点的所有标签,以便w3验证程序不显示任何错误:

I am trying to figure all the valid HTML5 elements that can be nested inside paragraph elements such that w3 validator doesn't show any errors. I mean I am trying to figure all tags that can replace the dots in the following code such that w3 validator doesn't show any errors:

<p>...</p>

是否有这样的列表可用?我尝试在Google上搜索,没有任何运气。

Is there such a list available? I tried searching on Google without any luck.

即使逆向列表可用,即无法嵌套在段落元素内的元素,对我来说也足够了。

Even if the converse list is available, i.e. elements that can not be nested inside paragraph elements, it is good enough for me.

推荐答案

HTML5规范告诉我们< p> 元素的内容模型是短语内容。表达内容由规范定义:
$ b

The HTML5 spec tells us that the <p> element's content model is phrasing content. Phrasing content is defined by the spec:


3.2.5.1.5表达内容



<表达式内容是文档的文本,以及
在段落内标记文本的元素。运行
内容的表单段落。

3.2.5.1.5 Phrasing content

Phrasing content is the text of the document, as well as elements that mark up that text at the intra-paragraph level. Runs of phrasing content form paragraphs.

这篇关于可以嵌套在P元素中的HTML5元素列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆