How to link .css file into html file


#1

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


#2

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

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

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


#3

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


#4

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


#5

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.


#6

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