Internal and External CSS

 Example of using Internal CSS in HTML


<!DOCTYPE html>
<html>
<style>
    body {background-color: powderblue;}
    h1  {color: blue;}
    p    {color: red;}
</style>
</head>
<body>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>

Output:




Example of using External CSS in HTML

<!DOCTYPE html>
<html>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>

Output:
No colour because no External CSS file detected


Comments

Popular posts from this blog

My Page 2

TCP//IP