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?

Received 100 so far from 4 kind contributors.