Crenox

CSS Tutorial for Beginners LearnCode.academy #5

Jun 26th, 2015
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Bootstrap Layouts</title>
  6. <style>
  7. p
  8. {
  9. color: green;
  10. }
  11. </style>
  12. <link href="styles/main.css" rel="stylesheet" type="text/css" />
  13. <link href="styles/other.css" rel="stylesheet" type="text/css" />
  14. <!-- Latest compiled and minified CSS -->
  15. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
  16. <!-- Optional theme -->
  17. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
  18. </head>
  19.  
  20. <body>
  21. <p style="color:green" id="main">Hello World</p>
  22.  
  23. <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
  24. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  25. <!-- Latest compiled and minified JavaScript -->
  26. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
  27. </body>
  28. </html>
  29.  
  30. <!--
  31. Bootstrap allows you to make responsive layouts, and responsive layouts are
  32. layouts that act responsively to the users browser and/or device
  33.  
  34. Style always goes on the top, and the actual coding goes on the bottom
  35. so that the style and webpage show first and all of the functionality comes
  36. last
  37.  
  38. What a container class does it gets your elements centered
  39. -->
  40. -------------------------------------------------------------------------------------------------------------------------------
  41. p
  42. {
  43. color: blue;
  44. }
  45.  
  46. /*
  47.  
  48. How Specifity Works
  49. IDs are the most specific of them all, so if you were to make an element into an ID
  50. that overrides everything else. Also, the more down you go in CSS the more specific it gets,
  51. but even if an ID is at the top and an element uses it it overrides everything.
  52.  
  53. It's easier sometimes to have separate stylesheets for grouping purposes.
  54.  
  55. The further down something is, it'll override everything
  56.  
  57. What'll override everything is styling right in the element in HTML
  58.  
  59. */
  60. -------------------------------------------------------------------------------------------------------------------------------
  61. p
  62. {
  63. color: red;
  64. }
Add Comment
Please, Sign In to add comment