A tutorial on how to get HTML elements with multiple classes with JavaScript. — Sometimes, we want to get multiple elements with multiple classes with JavaScript. In this article, we’ll look at how to get HTML elements with multiple classes with JavaScript. Get HTML Elements with Both Classes To get HTML elements with both classes, we can use the getElementsByClassName or querySelectorAll methods.