Multiple selectors at once (Should know)
This section will teach you how to use more than one selector, and it doesn't matter if they're of the same or different kind, in a single call. The goal of the task is to print on the console the length of the retrieved collections.
How to do it...
This task can be achieved by performing the following instructions:
- Create a copy of the
template.htmlfile and rename it as
- Inside the
<body>tag, add the following HTML markup:
<h1 id="title" class="bold red">Multiple selectors at once</h1> <div id="container" class="wrapper"> This example shows you the use of Multiple selector. <p id="description" class="red">Using it you'll have better performance, so adopt it when possible.</p> ...