02-css-file
This way we can include the CSS of an external file, it is highly recommended when you have many html pages.
CSS File
CSS file is a way to apply styles to an HTML document by linking an external CSS file using the
<link>
tag. This method is preferred for larger projects as it allows for better
organization and reusability of styles across multiple HTML files.
Example:
<link rel="stylesheet" href="styles.css">
In this example, the styles.css
file contains all the CSS rules that will be applied to the
HTML document.
In the styles.css
file, you can define your styles like this:
body {
background-color: #f0f0f0;
font-family: Arial, sans-serif;
color: #333;
}