Edit in JSFiddle

<ul>
  <li><a href="downloads/datei.pdf">PDF-Dokument</a></li>
  <li><a href="downloads/datei.doc">Word-Datei</a></li>
  <li><a href="downloads/datei.xyz">Unbekannte Datei</a></li>
</ul>
a[href*="downloads"] {
  display: block;
  height: 20px;
  padding: 5px 25px;
}

a[href*="pdf"] {
  background: url(https://cdn4.iconfinder.com/data/icons/file-extensions-1/64/pdfs-24.png) no-repeat;
}

a[href*="doc"] {
  background: url(https://cdn4.iconfinder.com/data/icons/file-extensions-1/64/docs-24.png) no-repeat;
}