How do I apply style to each category of a list?

I’ve modified your code to reflect the wp_list_categories() function reference as suggested by @Usce.

This snippet will create an unordered list, remove the “Categories” list title, and add the li class with individual category ID so you can target each link in the list.

function catting ($atts, $content = null) {
echo '<div id="cats" class="catting">' . wp_list_categories('title_li=','current_category') . '</div>';
}
add_shortcode("cats", "catting");

Here’s some CSS to remove the bullets and margin so it essentially behaves just as your original code but with li wrapping your anchors.

The CSS will break the list we’ve created into a horizontal line. Just remember to modify your CSS to further customize the outcome i.e. adding styles for buttons.

#cats.catting ul {
display: inline;
}
#cats.catting ul li.cat-item {
list-style: none;
margin: 0px 10px;
}

I hope this answers your question.