Applying css stylesheet to html file in a browser

I have written a html fie in my editor (.html) and also made another file which is my style sheet (.css). I have placed the [link="text/css… code ]in the html file and named my stylsheet.
I opened my html file in the browser, but how do I apply the .css file to it?
Probably a basic question, but new to this so have no idea.
Hope someone can help me out.
Thanks.

Hey,

In your head tags you need to link your CSS in using the link tag
like so:

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

On you pc make sure your HTML and CSS file is in the same file/location

Thank you. IYour answer made me recheck my link code and I discovered I had placed a + instead of an =. Thank you!

Np, You’re welcome
Happy Learning :slightly_smiling:
Happy coding !

What inspired you to learn programming ?
Join the discussion

@dex6921,
Here some pointers…

google search
== the Book ==
jquery [your question] site:developer.mozilla.org
CSS [your question] site:developer.mozilla.org
javascript [your question] site:developer.mozilla.org
[your question] site:jquery.com
[your question] site:getbootstrap.com

== discussions / opinions ==
jquery [your question] site:stackoverflow.com
CSS [your question] site:stackoverflow.com
javascript [your question] site:stackoverflow.com

== guidance ==
www.crockford.com
[your question] site:crockford.com

http://stackoverflow.com/questions/1795438/load-and-execution-sequence-of-a-web-page
http://www.w3schools.com/jquery/trysel.asp