1. Introduction to Types of CSS

1.3. Internal or Embedded CSS


          Internal CSS, as compared to inline CSS, is used when an HTML page will have a unique style. The CSS properties are defined inside the tag in the head section of an HTML document.

          The sample code below and the following output shows that the browser window will have a teal background and both <h3> tags will have the same color and text-alignment.

The code


<!DOCTYPE html>
<html>
<head>
    <style>
        body {
         background-color: teal;
        }
        h3 {
         color: white;
         text-align: center;
        }
    </style>
</head>
<body>
    <h3>This is header3. </h3>
    <h3>This is another header 3</h3>
</body>
</html>


The output