WP/CP | Type: PHPIncorporating Dashicons into Content and Templates

Two approaches for adding dashicons in HTML, using WordPress native CSS.

<h2 class="dashicons-before dashicons-smiley">A Cheerful Headline</h2>

<h2><span class="dashicons dashicons-smiley"></span> A Cheerful Headline</h2>

Both would appear like this:

A Cheerful Headline

Obviously, further CSS would need to be added to make the icons appear the way you intended.

Reference Links