Css and Html codes link


I don't understand why we have to link Css and html can someone explain to me the procedure


HTML and CSS take care of different things.

HTML is the skeleton of your page, what the text is, where it will go from top to bottom.
CSS will design the page, give the text colors, place a block somewhere on the page, etc.

You don't want to mix the two in a single file. Instead, prefer to separate files. Each with their own purpose.

But! You will need the CSS to make your HTML document pretty. That's when you link the CSS to your HTML document.

All you have to do is insert it like this:

<link rel="stylesheet" type="text/css" href="mystylesheet.css" />

You can insert this after the <title></title> tags in your HTML code.

And voila, all the code within the stylesheet will be interpreted by the HTML document.


I wish the system would explain as clearly as you‚Äč:joy: