Retrieve all the tags from the wordpress

Displays a list of tags with links to each one and a specific class for each tag:

$tags = get_tags();
$html = '<div class="post_tags">';
foreach ($tags as $tag){
 $tag_link = get_tag_link($tag->term_id);
   
 $html .= "<a href='{$tag_link}' title='{$tag->name} Tag' class='{$tag->slug}'>";
 $html .= "{$tag->name}</a>";
}
$html .= '</div>';
echo $html;



ref http://codex.wordpress.org/Function_Reference/get_tags