Question about separate style sheet to html


#1

I created an html doc and I was trying to style it using CSS. My style sheet name is “heart.css”. Nothing is happening. Will this link my html doc to my style sheet?

 <html>
  <head>
    <title>Anatomy and Physiology of the Heart</title>
     <link href="heart.css" type="text/css" rel="stylesheet">
   </head>

#2

It will, provided the file is in the same directory as your index.html file.


#3

Hello,

If a create a folder and put both files in it then it should link?

mtf

    May 6

qrazydc3:
Will this link my html doc to my style sheet?

It will, provided the file is in the same directory as your index.html file.


#4

Yes.

+ project/
    - index.html
    - heart.css

#5

Sorry I am confused new with these topics. Okay I have a folder called “Coding”. I have two things saved in it: heart.css and heart.html. So what do I need to do so the html file recognizes and alters appearance.


#6
+ Coding/
    - heart.html
    - heart.css

Click on the html file to open the page.


#7

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