‹ CSS

:nth-child()

Selecciona elementos segun su posicion entre sus hermanos, usando una formula: nth-child(2), nth-child(odd), nth-child(3n).

Vista previa

Codigo

ejemplo.html
<style>
  li:nth-child(odd) { font-weight: 800; }
</style>
<ul>
  <li>Uno (negrita)</li>
  <li>Dos</li>
  <li>Tres (negrita)</li>
  <li>Cuatro</li>
</ul>