Css 是否允许元素的子元素?
我最近一直在处理很多html结构,我开始想知道什么元素可以作为元素的子元素?只要没有任何交互内容,如按钮、表单、其他链接 w3.org HTML5规范: 元素可以围绕整个段落、列表、表格等,甚至整个部分,只要按钮或其他链接中没有交互内容 看 下面是一个示例,说明您仍然可以在w3.org中执行的操作:Css 是否允许元素的子元素?,css,html,Css,Html,我最近一直在处理很多html结构,我开始想知道什么元素可以作为元素的子元素?只要没有任何交互内容,如按钮、表单、其他链接 w3.org HTML5规范: 元素可以围绕整个段落、列表、表格等,甚至整个部分,只要按钮或其他链接中没有交互内容 看 下面是一个示例,说明您仍然可以在w3.org中执行的操作: <aside class="advertising"> <h1>Advertising</h1> <a href="http://ad.ex
<aside class="advertising">
<h1>Advertising</h1>
<a href="http://ad.example.com/?adid=1929&pubid=1422">
<section>
<h1>Mellblomatic 9000!</h1>
<p>Turn all your widgets into mellbloms!</p>
<p>Only $9.99 plus shipping and handling.</p>
</section>
</a>
<a href="http://ad.example.com/?adid=375&pubid=1422">
<section>
<h1>The Mellblom Browser</h1>
<p>Web browsing at the speed of light.</p>
<p>No other browser goes faster!</p>
</section>
</a>
</aside>
只要没有任何互动内容,如按钮、表单、其他链接 w3.org HTML5规范: 元素可以围绕整个段落、列表、表格等,甚至整个部分,只要按钮或其他链接中没有交互内容 看 下面是一个示例,说明您仍然可以在w3.org中执行的操作:
<aside class="advertising">
<h1>Advertising</h1>
<a href="http://ad.example.com/?adid=1929&pubid=1422">
<section>
<h1>Mellblomatic 9000!</h1>
<p>Turn all your widgets into mellbloms!</p>
<p>Only $9.99 plus shipping and handling.</p>
</section>
</a>
<a href="http://ad.example.com/?adid=375&pubid=1422">
<section>
<h1>The Mellblom Browser</h1>
<p>Web browsing at the speed of light.</p>
<p>No other browser goes faster!</p>
</section>
</a>
</aside>
HTML5的变化
尽管以前的HTML版本限制了a元素只包含语法内容,在以前的版本中被称为“内联”内容,但a元素现在是透明的;也就是说,一个元素的实例现在基本上也允许包含流内容,若该元素实例的父元素是一个允许包含流内容的元素,那个么在以前的版本中被称为“块”内容
HTML5的变化
尽管以前的HTML版本限制了a元素只包含语法内容,在以前的版本中被称为“内联”内容,但a元素现在是透明的;也就是说,一个元素的实例现在基本上也允许包含流内容,若该元素实例的父元素是一个允许包含流内容的元素,那个么在以前的版本中被称为“块”内容
你可以随时测试什么是有效的,什么是无效的。你可以随时测试什么是有效的,什么是无效的,但它不能包含其他帖子的答案,但它不能包含其他帖子的答案