I don't know whats wrong


#1

I think that other people have asked the same thing and i can not see where they fixed the problem. I have written everything correctly i believe but when i press submit it keeps saying change h1 to font-family Verdana. what am i doing wrong? or is this just a glitch?
HTML

<head>
<link> 
<a  type='text/css' rel='stylesheet'/>
<a href="stylesheet.css"/>
	<title>Result</title>
</head>
<body>
<h1> here is something</h1>
<p> and i am just writing something here</p>
</body>


STYLESHEET
h1 {
font-family: Verdana;
color: #576D94;
}
p {
font-size: 18px;
color: #576D94;
}

I had to remove the doctype and html so that the site would not post it as a webpage

Replace this line with your code.


#3

Your HTML is not linked to your CSS(stylesheet)

This is the format for linking in the stylesheet:

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

#4

thanks that was what was wrong. I just i thought that the a href was the link since it was in there. Is the a href necessary then? i am going to experiment with deleting that and see if that does anything


#5

href is the link to your CSS so yes its necessary without it your CSS won't be linked


#6

No, maybe i can clear up something. Both your link to stylesheet:

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

and a anchor element:

<a href="http://facebook.com">facebook</a>

but in your link to stylesheet, href tells <link> where the css file is located and what the name of the stylesheet is. In the anchor element (<a></a>) it will redirect the user to that specific page. So href is used differently, depending on in which element (<link> or <a>) you use it


#7

yeah i meant the <a href> that i guess that i added. I had <a> instead of link so that was the reason that the code was not working. once i added the < link href> etc then everything worked fine. the <a href> was unnecessary


#8

You use a href when creating a hyper link in HTML using the a tag
Like so:

<a href="http://www.website.com"> your link text </a>

#9

yeah thanks a lot. you were really helpful. I understand now. I will not make that mistake again