<p><a href="example.pdf">Download PDF</a></p>
<p><a href="example.doc">Download Doc</a></p>
body {
  font-family: 'Arial';
  padding: 1rem;
  max-width: 600px;
  margin: 2rem auto;
}

p {
  margin-bottom: 1.5rem;
}

a {
  position: relative;
  text-decoration: none;
  color: #000;
}

a[href$=".pdf"] {
  &:before {
    content: "";
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
    width: 18px;
    height: 18px;
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/182774/np_pdf_377198_000000.svg) center/20px no-repeat;
    padding: 3px;
    //outline: solid 1px red;
  }
}

a[href$=".doc"] {
  &:before {
    content: "";
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
    width: 18px;
    height: 18px;
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/182774/np_word_1306442_000000.svg) center/20px no-repeat;
    padding: 3px;
    //outline: solid 1px red;
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.