Advertisement
Guest User

htmlcss

a guest
Oct 20th, 2014
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. div.container1 {
  2. color:blue;
  3. }
  4.  
  5. div.container1 p{
  6. color:yellow;
  7. }
  8.  
  9. <!DOCTYPE html>
  10. <html>
  11. <head>
  12. <link rel="stylesheet" type="text/css" href="styles/5.css"/>
  13. </head>
  14. <body>
  15. <p>separate paragraph</p>
  16. <div class="container1">
  17. regular text in the div
  18. <p>direct child of the div</p>
  19. <div>
  20. <p>
  21. indirect child of the div
  22. </p>
  23. </div>
  24. </div>
  25.  
  26. <div class="container2">
  27. regular text in the div
  28. <p>direct child of the div</p>
  29. <div>
  30. <p>
  31. indirect child of the div
  32. </p>
  33. </div>
  34. </div>
  35. </body>
  36. </html>
  37.  
  38.  
  39.  
  40. div.container2 {
  41. color:blue;
  42. }
  43.  
  44.  
  45. div.container2 > p{
  46. color:red;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement