Can't link my external css file

i am very new to the website designing community and have been learning through a pdf from sitepoint itself but recently when they asked me to link an external css file i was unable to do so or else i couldn’t see any effects.
Here is the Css code:-

body {
font-weight: bold;
color: blue;
font-family: algerian;

here is the nark up for my page (ps its pretty much empty)

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN””>
<html xmlns=“”>
<title>Robotryst 2013</title>
<meta http-equiv=“Content-Type”
content=“text/html; charset=utf-8”/>
<link href=“style1.css” rel=“stylesheet” type=“text/css”/>
<div id=“header”>
<h1> Robotryst @ Musaliar College</h1>
<p> Robotryst is Organized in association with <strong>TRYST</strong> and <strong>Robosapiens</strong>, Delhi</p>
<li><a href=“index.html”>Home</a></li>
<li><a href=“about4.html”>Main Attractions</a></li>
<li><a href=“contacts.html”>Contact Us</a></li>
</div> <!-- end of header –>
<div id=“taglines”>
<h2> Win Prizes Worth <em> 1 Lakh </em> Rupees <h2>
<h3> Hunt For India’s Super <em> Robo </em> Genius !!! </h3>
<p><img src=“free kit.jpg” width=“480” height=“203”
alt=“free robotics kits”/></p>
</div><!-- end of taglines–>

please help me i have been stuck in this part of the tutorial for quite a time now

Hi Alen Thomas. Welcome to the forums. :slight_smile:

What you have will work fine, as long as the path to your CSS file is correct. What you have at the moment:

<link [COLOR="#FF0000"]href="style1.css"[/COLOR] rel="stylesheet" type="text/css"/>

is telling the browser to look for the style1.css file in the same folder as the page itself. But if your CSS file is stored somewhere else, the path needs to be different. E.g. if the CSS file is in a folder called /styles/ in the root folder, the link would look something like this:

<link [COLOR="#FF0000"]href="styles/style1.css"[/COLOR] rel="stylesheet" type="text/css"/>

So the question is, where is the CSS file in relation to your page?

thanx a lot it was placed in a different folder
the new linking worked !!:slight_smile:

Glad to hear it! Don’t hesitate to come back if you have further questions. :slight_smile: