在我的HTML中,我很好奇是否在语义上正确使用唯一标识符,例如<toys> </toys>保存图像而不是图像<h2>.例如:
是否首选:
<toys class="grid_4 push_2"> </toys>
与CSS:
toys {
background: url("toys.png") no-repeat scroll 0 0 transparent;
width: 181px;
height: 93px;
margin-top: -8px;
}
Run Code Online (Sandbox Code Playgroud)
而不是:我目前有:
<h1 class="grid_4 push_2"> </h1>
与CSS:
h1 {
background: url("toys.png") no-repeat scroll 0 0 transparent;
width: 181px;
height: 93px;
margin-top: -8px;
}
Run Code Online (Sandbox Code Playgroud)
是否使用像<toys>语义正确的唯一标识符?