var el = document.querySelector(".myclass");
//Pretend there is a <p> with class "example"
const myParagraph = document.querySelector('.example');
//You can do many this with is
myParagraph.textContent = 'This is my new text';
const elt = document.querySelector("#myId p.article > a");
var element = document.querySelector("#myid .myclass p");
// TO select all the h1 from Html
document.querySelectorAll("h1")
//To select h1 from a particular class or id
document.querySelector(".className/#id h1")
// Go to html and find out what type of HTML element you want to select.
// Is it div, p, h3 or something else?
// When you know, select it with
document.querySelector();
// querySelector() accepts the name of the element as argument
let Element = document.querySelector(".class");
<div id="fooar"></div>
<div id="foo:bar"></div>
<script>
console.log('#fooar'); // "#fooar" ( is the backspace control character)
document.querySelector('#fooar'); // Does not match anything
console.log('#fooar'); // "#fooar"
console.log('#foo\bar'); // "#fooar"
document.querySelector('#foo\bar'); // Match the first div
document.querySelector('#foo:bar'); // Does not match anything
document.querySelector('#foo:bar'); // Match the second div
</script>
// Select the first <div>
const firstDiv = document.querySelector('div');
// Select the first .button element inside .main-navigation
const navMenu = document.getElementById('main-navigation');
const firstButtonChild = navMenu.querySelector('.button');
document.querySelector(".example");
const myHeading = document.querySelector('h1');
myHeading.textContent = 'Hello world!';
const para = document.querySelectorAll('p');
element = document.querySelector(sélecteurs);
document.querySelector('html').onclick = function() {};
querySelector();