Internal CSS Linking
It includes CSS directly within the HTML document. It uses the <style>
element within the <head>
or <body>
section.
Syntax
<style>
body {
background-color: #f0f0f0;
}
</style>
What are the different ways to include CSS Code in HTML ?
In HTML, styles can be incorporated through external linking, where a separate CSS file is connected to the HTML document using the <link> tag in the <head> section, ensuring consistency across multiple pages.
Alternatively, internal styling can be employed by placing CSS rules within a <style> tag in the <head> section, suitable for smaller projects or single-page styles.