Their CSS is the below, which you could take an modify to your needs:
.tag, .qa-tag-link {
background: #606060;
color: white;
font-size: 0.9em;
font-weight: normal;
line-height: 24px;
padding: 4px 8px;
margin: 0px 2px;
-webkit-border-radius: .4em;
-moz-border-radius: .4em;
border-radius: .4em;
word-wrap: break-word;
white-space: normal;
}