JSFiddle - React, Tailwind, and code Playground

by Fibonacci_Spiral

HTML

<div class="treehouse">
  <h3>Text under Images</h3>
  
  <div class="image-block">
    <div class="img"></div>
    <h4>Short Text</h4>
  </div>
  
  <div class="image-block">
    <div class="img"></div>
    <h4>Short Text</h4>
  </div>
  
  <div class="image-block">
    <div class="img"></div>
    <h4>Short Text</h4>
</div>

<hr>

<div>
  Ethan Rivas for
  <a href="https://teamtreehouse.com/community/need-help-aligning-text-under-images">treehouse community.</a>
</div>

CSS

.treehouse {
  text-align: center;
}

.image-block {
    display: inline-block;
    margin-right: 20px;
}

.img {
    width: 180px;
    height: 250px;
    border-radius: 20px;
    background-image: url('https://shop.arborday.org/data/default/images/catalog/250/Turnkey/1/longleaf-pine-1095.jpg');
}

// You don't need this.