<div class="content">
<div class="default">Див, прописанный в разметке</div>
<div class="custom">Див, добавленный скриптом</div>
</div>
document.addEventListener('DOMContentLoaded', function() {
let custom = document.querySelector('.custom')
console.log(custom);
})
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.