Display tags next to date on WordPress post list

How do you display a Tag next to the date of a post in WordPress? You can add tags to a post, but how do you display them next to the post?

I have the following code that pulls all posts in the Media Coverage category:

<div class="press_item">
                <?php $posts = get_posts('category_name=media-coverage&numberposts=300'); foreach($posts as $post) { ?>
                <li><a href="<?php the_permalink() ?>" target="_parent"><?php the_title(); ?></a></li>
                <p>Date posted: <?php the_time('F j, Y'); ?></p><hr>
                <?php } ?>
</div>

Related posts

Leave a Reply

1 comment

  1. Inside the loop:

    <?php the_tags( $before, $sep, $after ); ?> 
    

    If you are outside the loop:

    <?php
    $posttags = get_the_tags($post->ID);
    if ($posttags) {
      foreach($posttags as $tag) {
        echo $tag->name . ' '; 
      }
    }
    ?>