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.

Similar Reads

External CSS Linking

It is used to Link an external CSS file to your HTML document. It promotes the separation of concerns, making it easy to manage styles across multiple pages....

Internal CSS Linking

It includes CSS directly within the HTML document. It uses the