In CSS you can select targets by their Attribute. The basic form being element[attr=“value”]. But this can be extended to partial values.

^Beginning Substring | element[attr^="substring"] |

Ending Substring element[attr$=“substring”]
Any Substring element[attr*=“substring”]
Part of a space separated list element[attr~=“value”]

To put this to a cool use, as an example to put an icon to the end of every link to a pdf document on the site use:

a[href$=".pdf"] {
  background-image: url('pdf.png');
  background-repeate: no-repeat;
  background-position: right;
  padding-right: 20px;