我试图计算所有可以嵌套在段落元素内的所有有效的HTML5元素,使得w3验证器不显示任何错误。我的意思是我试图计算所有的标签,可以替换以下代码中的点,使得w3验证器不显示任何错误:
<p>...</p>
有这样的列表吗?我试着在谷歌搜索没有任何运气。
即使逆序列表是可用的,即不能嵌套在段落元素中的元素,对我来说是足够好的。
解决方法
The HTML5 spec告诉我们,< p>元素的内容模型为
phrasing content.词组内容由规范定义:
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.07002(if it contains only phrasing content)0700307004(if it is a descendant of a07005element)07006070070700807009070010070011070012070013070014070015070016070017(if it contains only phrasing content)070018070019070020070021070022070023070024070025(if it contains only phrasing content)07002607002707002807005(if it contains only phrasing content)070030070031070032070033070034070035070036070037070038070039070040070041070042070043070044070045070046070047070048070049070050070051070052070053070054070055