How to link .css file into html file


like if i have to link the file from my computer's local files


If you want to link a external css file you should do it like this:

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

the rel attribute is a something like an description
type attribute let's the html know what kind of text it is in the file
href is the path of the fileyou wanr


i need answer..
Link a file called style.css to index.html. The attributes should be set in the following order: href, type, rel.


i looked it up from w3schools rlly fast but i know :wink:


Thanks for the help. I couldn't get my file to link by using the syntax they suggested. You're correct, the href has to go first.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.