Wrapping flex items

Items go to the next line when there is not enough space.

CSS · Wrapping flex itemsBeginner
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tags li {
  list-style: none;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: #eef2ff;
}
flexboxwraptagsresponsive