How to check if post has any tag?

Make better use of the parameters:

<?php 
the_tags(
    '<div class="tags"><span>Tags</span>', // before
    ' ', // separator
    '</div>' // after
); 
?>

Now you will never get any useless markup, because WordPress will not print anything when there are no tags for the current post.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)