任何HTML内的元素的属性,应该描述它们语义上的目的,而不仅仅是它们在某个特定介质中所想要的表现属性。例如,<span class="red small">password too short</span>在语义上毫无意义,然而<span class="warning">password too short</span>会有用的多。[1]通过对CSS的正确使用,「warnings」可能被渲染为一个红色,小字体,但当被打印出时,它们可能被省略,因为此时对它们做任何事情都为时已晚。也许被说出时它们可以
被给与额外的重音,而且在语速上有一个较小的减少。第二个例子是语义化的标记,而不仅是表现上的,但当结合CSS时满足了这两种目的。
^Harold, Elliotte Rusty. Refactoring HTML. Addison Wesley. 2008: 133. ISBN 0-321-50363-5. HTML does not have individual elements representing these uses. Instead they should be indicated by a span or div element whose class attribute indicates the reason for formatting the text as italic: [example ...] <span class="species">...
^Harold, Elliotte Rusty. Refactoring HTML. Addison Wesley. 2008: 184. ISBN 0-321-50363-5. There is no simple way to find all the unidentified lists in a site. [...] They can be marked up in dozens of different ways: as paragraphs, divs, tables, [etc]. Once you've found a list, marking up the individual items is easy. Just use ul, ol, or dl instead of the current wrapper element. [...] For example to remove the bullets add this rule to the page's CSS stylesheet: [...]