Tags on Tumblr Photoset posts show up above (instead of below) the post caption

I’m using a pre-made theme and just wanted to edit the look of the tags. I have this code typed before {/block:quote}, {/block:photo}, etc:

 <div class="tag">
 {block:HasTags}
          {block:Tags}
             <i>
             <font size="2">
             <font color="{color:Links}">
             <font="Lucida Sans Unicode">
             #<a style="{color:Links};" href="{TagURL}">{Tag}</a>
             </font>
             </font>
             </i>
          {/block:Tags}
    {/block:HasTags}
</div>

And it works just fine for every type of post except for Photoset posts. The tags on those posts show up above the post’s caption instead of below the post (where I’d like them to be and where the tags are for every other type of post).

For reference, the full code for my photoset posts:

<!----- photoset posts ----->
{block:Photoset}
    <div class="photo">
        <div class="photo-slideshow" id="photoset_{PostID}" data-layout="{PhotosetLayout}">
            {block:Photos}
                <div class="photo-data">
                    <div class="pxu-photo">
                        <img src="https://webapps.stackexchange.com/{PhotoURL-500}" width="{PhotoWidth-500}" height="{PhotoHeight-500}" data-highres="{PhotoURL-HighRes}" data-width="{PhotoWidth-HighRes}" data-height="{PhotoHeight-HighRes}">
                   </div>
                   <a class="tumblr-box" rel="post-{PostID}" href="{PhotoURL-HighRes}"></a>
                </div>
            {/block:Photos}
                
        </div>
    <div class="tag">
    {block:HasTags}
          {block:Tags}
             <i>
             <font size="2">
             <font color="{color:Links}">
             <font="Lucida Sans Unicode">
             #<a style="{color:Links};" href="{TagURL}">{Tag}</a>
             </font>
             </font>
             </i>
          {/block:Tags}
    {/block:HasTags}
</div>
{/block:Photoset}

I don’t ‘code’ much, so I don’t know what to do. Thanks.