Internal Style Sheets

Internal CSS

The internal style sheet is used to add a unique style for a single document. It is defined in <head> section of the HTML page inside the <style> tag.
Example:
  1. <!DOCTYPE html>  
  2. <html>  
  3. <head>  
  4. <style>  
  5. body {  
  6.     background-color: linen;  
  7. }  
  8. h1 {  
  9.     color: red;  
  10.     margin-left: 80px;  
  11. }   
  12. </style>  
  13. </head>  
  14. <body>  
  15. <h1>The internal style sheet is applied on this heading.</h1>  
  16. <p>This paragraph will not be affected.</p>  
  17. </body>  
  18. </html>  

No comments:

Post a Comment