Add tid or name as a class to each item of a taxonomy term
You can modify the output of any field with:

drupal standard field tlps

Possible override templates are:

field.tpl.php

field--content-type.tpl.php

field--field-name--content-type.tpl.php

field--field-type.tpl.php

field--field-name.tpl.php
So according to your specification in comment
&quot;product_display&quot;  and the reference term field is &quot;field_product_specs&quot;
your custom tpl file name should be field--field-product-specs--product-display.tpl.php


OR

Fences


Fences is a an easy-to-use tool to specify an HTML element for each
field. This element choice will propagate everywhere the field is
used, such as teasers, RSS feeds and Views. You don't have to keep
re-configuring the same HTML element over and over again every time
you display the field.