+ 6

How do you link css and html

Please can someone tell me how to link my CSS file to the HTML file so they function as 1 program on my laptop using notepad++

27th Sep 2017, 11:45 PM
Daniel
6 odpowiedzi
+ 10
Hi @Daniel! You must include a <link> tag in your HTML page (between <head> tags), stating where your css file reside by using "href" attribute.. for example: <head> <link rel="stylesheet" type="text/css" href="style.css"> </head> I hope this helps you..
27th Sep 2017, 11:59 PM
noobcøder
noobcøder - avatar
+ 10
Ah noobcoder you came first!
27th Sep 2017, 11:59 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 7
To start with, open up your html document in Sublime Text. In the header section, add: <link rel="stylesheet" type="text/css" href="PATHTOCSSHERE">. You want to change "PATHTOCSSHERE" with the path to the css file you are trying to link the html page to.
29th Sep 2017, 9:49 AM
Jaydeep Khatri
Jaydeep Khatri - avatar
+ 1
<html> <head> <link rel="stylesheet" href=" stylesheet.css"> </head> </html> Save your css file as stylesheet.css in same folder where you put all your website stuff.
28th Sep 2017, 1:38 PM
Satyam Kumar
Satyam Kumar - avatar
+ 1
Thank you all very much it worked
28th Sep 2017, 8:28 PM
Daniel