Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Title</title>
- </head>
- <body>
- <div id="dvi1" class="div1">
- <ul id="ul" class="ul">
- <li>11</li>
- <li>22</li>
- <li>33</li>
- <li>44</li>
- </ul>
- </div>
- </body>
- </html>
- <div>
- <p>This is our first paragraph</p> <!-- This one should be blue -->
- <p>This is our second paragraph</p> <!-- This one should be red -->
- </div>
- p:nth-of-type(1) {
- color: blue;
- }
- p:nth-of-type(2) {
- color: red;
- }
- p:nth-child(1) {
- color: blue;
- }
- p:nth-child(2) {
- color: red;
- }
- li:nth-of-type(5n+1) {
- color: green;
- }
- li:nth-of-type(3n+1) {
- font-weight: bold;
- }
- li:nth-of-type(3n+2) {
- background: blue;
- }
- li:nth-of-type(3n+3) {
- color: red;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement