Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- div.container1 {
- color:blue;
- }
- div.container1 p{
- color:yellow;
- }
- <!DOCTYPE html>
- <html>
- <head>
- <link rel="stylesheet" type="text/css" href="styles/5.css"/>
- </head>
- <body>
- <p>separate paragraph</p>
- <div class="container1">
- regular text in the div
- <p>direct child of the div</p>
- <div>
- <p>
- indirect child of the div
- </p>
- </div>
- </div>
- <div class="container2">
- regular text in the div
- <p>direct child of the div</p>
- <div>
- <p>
- indirect child of the div
- </p>
- </div>
- </div>
- </body>
- </html>
- div.container2 {
- color:blue;
- }
- div.container2 > p{
- color:red;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement