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

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.