+ 2

How CSS works

I am confused how CSS works with HTML I mean how we will join the two documents.when one is in .CSS format and other in .html.please help me

27th Dec 2018, 2:47 AM
Anmol Kumar
Anmol Kumar - avatar
2 odpowiedzi
+ 6
You just need to link the .css file to the .html. Read the lesson to understand it better. https://www.sololearn.com/learn/CSS/1079/
27th Dec 2018, 2:50 AM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar
+ 3
<head> <link rel="stylesheet" href="example.css"> </head> Further to Jonathan's answer, I like to further explain the url. For the value of href attribute, you can use absolute location or relative location. Absolute location means with http://www.domain.com/example.css Relative location can be used when the files are placed in the same directory of the same server. The example in Sololearn lesson is relative location
27th Dec 2018, 2:56 AM
Gordon
Gordon - avatar