With our template in place, we can start diving into the world of jQuery selectors. A selector is a string that allows you to retrieve DOM's elements. The first selector we'll look at is the
All (or Universal) selector. We'll use it to apply a border to all of the page's elements.
To achieve our goal, perform the following steps:
template.htmlfile and rename it
<body>tag, add the following HTML markup:
<h1>The all selector</h1> <div> This example shows how to use the All selector. <p>As you can see, it doesn't matter we're different tags, we all have the border applied.</p> <span>Every tag has the border, even the body, the html and the head tag!</span> ...