JSFiddle - React, Tailwind, and code Playground

HTML

<h1>Title</h1>
<p>This is a paragraph</p>
<p>This is another paragraph</p>
<div class="img"></div>

CSS

.img {
    
    width: 50px;
    height: 50px;
    border: 1px solid black;
    display:block;
}

.first-col {
    
    border: 1px solid red;
}

.second-col {
    
    border: 1px solid teal;
}

JavaScript

$('h1').wrapAll('<div class="first-col" />');
$('.img').wrapAll('<div class="second-col" />');