Internal CSS Explained!!!

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.

  • But in the Internal CSS, we can not control styles for multiple documents at once.
  • Internal style Sheet is applicable to the Page in which it is included.
  • Internal Style Sheet is used to style individual page.
  • It’s impossible to style "pseudo-elements" and classes with inline styles. With Internal style sheets, you can style the visited, hover, active, and link color of an anchor tag. 
  • An internal style sheet may be used if one single page has a unique style.

Example:-



<html>  

<head>  

<style>  
body {  
    background-color: linen;  
}  
h1 {  
    color: red;  
    margin-left: 80px;  
}   
</style>  
</head>  
<body>  
<h1>The internal style sheet is applied on this heading.</h1>  
<p>This paragraph will not be affected.</p>  
</body>  

</html>  

                                                       

           





Post a Comment

0 Comments