<a href="#1" class="item1">Link 1</a>
<a href="#2" class="item2">This is link 2.</a>
<a href="#3" class="item3">3rd</a>
<div class="item4"></div>
body {
column-count:2;
width:max-content;
}
a {
  background: tan;
  margin:0 0 5px;
  display:block;
  width:max-content;
}
div {
  width: 100px;
  height: 100px;
  background: green;
  display:inline-block;
  -webkit-column-break-inside: avoid;
          page-break-inside: avoid;
               break-inside: avoid;
}
.item1{font-size:25px}
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.