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

You’ll first need to place the CSS file in a folder that you can call upon. In this example the file named “stylesheet” is in a sub folder of the main directory called “style”. Therefore, the directory path would be “style/stylesheet.css”.
next we would have to use the following code by placing it in between the <head> </head> part of the code near the top:<link rel=“stylesheet” href=“style/stylesheet.css” />

Related HTML and CSS Mentoring answers

All answers ▸

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


Show how you would give all elements that have a class of 'class1', a green background.


Describe the advantages and disadvantages of the three main ways of adding CSS to a website


how to code the details tag/ how to put a drop down option in a form?


We're here to help

contact us iconContact usWhatsapp logoMessage us on Whatsapptelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo
Cookie Preferences