HTML: Embed CSS file - how it works
Related Videos: 6: How Do We Include CSS In Our HTML | Basics Of CSS | Learn HTML and CSS | HTML Tutorial (May 2024).
To embellish your HTML framework, you should include a CSS file. You can find out exactly how this works in this practical tip.
Include CSS to design your HTML elements
With the Cascading Style Sheet you give a bland HTML skeleton a suitable cover and insert any colors and shapes. In principle, you can also write the CSS code directly into the HTML file. A separate CSS file is usually preferable to this:
- Create a file with the extension ".css". Write the CSS code into this file.
- To apply this code to your HTML elements, you have to include the CSS file.
- To do this, create between and the following self-closing day:
- If your CSS file is in the same folder, the file name (including the ending) suffices as "href", for example "stylesheet.css".
- All changes that you now make in the CSS file are applied to your HTML elements.
"/>
In our practical tips, we also show you the best HTML editors for Linux.