我仍然对在 html 5 中使用“部分”感到非常困惑。我只是想知道以下哪种解决方案更好。列表中的内容彼此不相关。所以我必须给他们每个人一个部分还是我必须把它们都放在一个部分中。见下文:
解决方案一:
<ul>
<li>
<section>
<header>
<h2>Services</h2>
</header>
<img src="img/foto/testpic1.jpg" alt="" title="" border="0"/>
<p>This is text</p>
</section>
</li>
<li>
<section>
<header>
<h2>Products</h2>
</header>
<img src="img/foto/testpic2.jpg" alt="" title="" border="0"/>
<p>This is text</p>
</section>
</li>
<li>
<section>
<header>
<h2>Contacts</h2>
</header>
<img src="img/foto/testpic3.jpg" alt="" title="" border="0"/>
<p>This is text</p>
</section>
</li>
</ul>
解决方案二:
<section>
<ul>
<li>
<header>
<h2>Services</h2>
</header>
<img src="img/foto/testpic1.jpg" alt="" title="" border="0"/>
<p>This is text</p>
</li>
<li>
<header>
<h2>Products</h2>
</header>
<img src="img/foto/testpic2.jpg" alt="" title="" border="0"/>
<p>This is text</p>
</li>
<li>
<header>
<h2>Contacts</h2>
</header>
<img src="img/foto/testpic3.jpg" alt="" title="" border="0"/>
<p>This is text</p>
</li>
</ul>
</section>