Так же нашёл решение как вытягивать содержание блока внутри страницы и размещать в другом месте
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
</head>
<body>
<div id="source">
<p>This is the source div.</p>
<p>It contains some text.</p>
</div>
<div id="result" style="color: red;"></div>
</body>
<script>
var html = $("#source").html();
document.getElementById("result").innerHTML = html;
</script>
</html>