The .css file

The .css file

Developers avoid mixing code by storing HTML and CSS code in separate files (HTML files contain only HTML code, and CSS files contain only CSS code).

You can create a CSS file by using the .css file name extension, like so: style.css

With a CSS file, you can write all the CSS code needed to style a page without sacrificing the readability and maintainability of your HTML file.


We can link a .css file with a .html file with the following code...

<link rel="stylesheet" href="./src/styles.css"/>

Post a Comment

Previous Post Next Post