<div class="container">
<ul class="tags">
<li class="tag">Tag</li>
<li class="tag">Tag too</li>
<li class="tag">Tag</li>
</ul>
</div>
.tags {
display: flex;
flex-wrap: wrap;
gap: 0.25rem;
}
.tag {
/* Bad bad bad: */
/* margin: 0 0.25rem 0.25rem; */
}
/* ETC (Formatting only): */
body {
margin: 1.5em;
font-size: 100%;
font-family: sans-serif;
background: #e5e3de;
color: #2E2C08;
font-weight: bold;
}
.container {
min-height: 10rem;
padding: 1rem;
background: white;
height: 15em;
}
.item {
padding: 1em;
text-align: center;
border: 10px solid #2E2C08;
max-width: 20em;
}
.tags {
list-style-type: none;
margin: 0;
padding: 0;
}
.tag {
padding: .5rem;
color: white;
background: #2E2C08;
display: inline-block;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.