How do you link a CSS document to a HTML file?

Both files need to be stored within the same folder. Once this has been done, within the <head> tags of your HTML file (the header), you will need to create a link to the CSS file.
This is done by using the <link> tag, as seen below:<link rel="stylesheet" type="text/css" href="filename.css">where filename is the name of the CSS file you wish to link.

KW

Related HTML and CSS Mentoring answers

All answers ▸

How to go about designing a responsive HTML 5 website


How would I link a CSS stylesheet to my HTML page?


What is the difference between classes and IDs?


Explain what an external style sheet (CSS document) is for in a HTML document and write a line of HTML code to import one