The HTML class attribute is used to specify a class for an HTML element. Multiple HTML elements can share the same class. The class attribute is often used to point to a class name in a stylesheet.
class="box red".classnamegetElementsByClassName()Edit the code below and click Run to see the result live.