Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <!--
- -->
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width">
- <title>querySelector and querySelector example 1</title>
- </head>
- <body>
- <button onclick="firstLiClassRedInUl();">Select first li of class red and color it in red</button>
- <br>
- <button onclick="allLisInUlOfClassNav();">Underline All li in a ul of class nav</button>
- <ul class="nav">
- <li>Home</li>
- <li class="red">Products</li>
- <li>About</li>
- </ul>
- Another list:
- <ul>
- <li>Apple</li>
- <li class="red">Cherries</li>
- <li>Oranges</li>
- </ul>
- </body>
- </html>
Add Comment
Please, Sign In to add comment