document.querySelector('.block2').insertAdjacentHTML('afterend', document.querySelector('.block1').outerHTML);