In the following examples, I loop over a tag field and set a link with classes 

 {% for key,value in node.field_project_tags.value %}
      <a class="btn text-white bg-blue500 border-blue500 mr-2 mb-1" href="{{ content.field_project_tags[key]['#url'] }}">{{ content.field_project_tags[key]['#title']}}</a>
 {% endfor %}

 

 

 

 

Saved you some valuable time?

 

Donate and get more free time-saving code on this website in the future.