Axel Richter: farbliche nummerierung bei liste

Beitrag lesen

Hallo Christian,

Wieso ist das ein Missbrauch?
<fundi>Weil Markup für Formatierungen eingesetzt würde.</fundi> ;-)

Das kommt drauf an, wie man es macht.

<html>
<head>
<title>test</title>
<style type="text/css">
<!--
ol.rbl {color:red;}
ol.rbl span {color:black;}
-->
</style>
</head>
<body>
<ol start="1" type="1" class="rbl">
<li><span>Listenpunkt</span></li>
<li><span>Listenpunkt</span></li>
<li><span>Listenpunkt</span></li>
<li><span>Listenpunkt</span></li>
<li><span>Listenpunkt</span></li>
</ol>
</body>
</html>

Der span trennt den schwarzen Listenpunkt _inhaltlich_ von der eigentlich roten Liste. ;-))

Welchen anderen Sinn hätten denn span- und div-Elemente?
<p lang="de">
Unter <span lang="en">content syndication</span> versteht man...
</p>

http://www.w3.org/TR/html4/struct/global.html#h-7.5.4

The DIV and SPAN elements, in conjunction with the id and class attributes, offer a generic mechanism for adding structure to documents. These elements define content to be inline (SPAN) or block-level (DIV) but impose no other presentational idioms on the content.

OK, soweit ist das Deine Meinung.

Thus, authors may use these elements in conjunction with style sheets, the lang attribute, etc., to tailor HTML to their own needs and tastes.

<pragmatiker>Zuviel Fundamentalismus ist ungesund.</pragmatiker>
;-))

viele Grüße

Axel