I don't know whats wrong

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?

<a  type='text/css' rel='stylesheet'/>
<a href="stylesheet.css"/>
<h1> here is something</h1>
<p> and i am just writing something here</p>
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.

<do not remove the three backticks above>

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" />

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

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

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

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

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> 

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

1 Like