我正在为自定义博客页面创建一个模板,并且想知道以下内容是否被归类为良好的 HTML5?
当前的
<article>
<header class="clearfix">
<h1><a href="/link">Title</a></h1>
<p>Posted on the <time><?=date?></time></p>
</header>
<div>
<p>main content will be here like this ...</p>
<p>main content will be here like this ...</p>
<p>main content will be here like this ...</p>
</div>
<footer>
<div class="clearfix">
<h3>Share this Article</h3>
<div class="social-button">Facebook</div>
<div class="social-button">Twitter</div>
<div class="social-button">Google</div>
</div>
<div>
<h3>Comments</h3>
<strong>Coming Soon ...</strong>
</div>
</footer>
</article>
我试图避免使用<div>
“主要内容”,但我需要使用 clearfix 并且如果没有div
?
article p:last-child:after{
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
会有多负面<div>
?也许我应该在<section>
那里使用?