<h1 class="title" id="title">hello world</h1>
const titleClass = document.querySelector('.title');
const titleId = document.querySelector('#title');
const titleTag = document.querySelector('h1');

console.log(titleClass);
console.log(titleId);
console.log(titleTag);

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.