JSFiddle - React, Tailwind, and code Playground
HTML
<a href="mailto:example@example.com">test</a>
<a href="http://example.com">test 2</a>
CSS
.class1 { color: red; }
.class2 { color: blue; }
JavaScript
$('a[href^="mailto:"]').addClass('class1');
$('a:not([href^="mailto:"])').addClass('class2');