Internal CSS

Internal CSS uses a <style> element in the <head> section to apply CSS to a single HTML page.

Example:

<!DOCTYPE html>
<html>
<head>
<style>
h1 {background-color: blue; color: white;}
p {color: blue;font-size: 25px;font-style: italic;}
</style>
</head>
<body>
<h1>Hello World!!</h1>
<p>How are you?</p>
</body>
</html>

Explanation:

In the above example, we used a <style> element in the <head> section to apply CSS to a single HTML page.

Please follow and like us:
Content Protection by DMCA.com