使用presentational和deprecated标签重置CSS

时间:2010-01-21 17:00:42

标签: css w3c web-standards

为什么Eric Meyer在css reset中没有明确的,表示性的,已弃用的和非语义的标签? (即applet,iframe,big,s,small,strike。)

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td 
{
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

2 个答案:

答案 0 :(得分:11)

因为人们仍然使用它们,不幸的是。在样式表中引用不推荐使用的元素没有任何效果。在标记中实际使用它们是无效的。 Meyer的重置是修复元素呈现的方式,而不是修复您选择使用的元素。

答案 1 :(得分:0)

这是一个“以防万一”复位的补充。他实际上建议过去不要使用已弃用的标签。

如果您正在关注标准专家,如Meyer,Cederholm,Collison等。等等,那么你可能已经知道不要使用它们了。

相关问题