I keep getitng told my a tag does not have an href attribute


#1


The problem I am having is that I believe my code is entirely correct however I continue to get the error: "Oops, try again. Did you remember to give your <a> tag a href attribute?". I have switched to firefox from chrome but that did not help. below is my code:
HTML:

<!DOCTYPE html>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
		<title>About Me</title>
	</head>
	<body>
		<img src="https://s3.amazonaws.com/codecademy-blog/assets/46838757.png"/>
		<p>We're Codecademy! We're here to help you learn to code.</p><br/><br/>
		<div>
			<a href='google.com'> Google is the best <span>website</span> </a>
		</div>
	</body>
</html>

CSS:

img {
	display: block;
	height: 100px;
	width: 300px;
	margin: auto;
}

p {
	text-align: center;
	font-family: Garamond, serif;
	font-size: 18px;
}

/*Start adding your CSS below!*/

div {
    height: 50px;
    width: 120px;
    background-color:#BCD2EE;
    border: 1px solid #6495ED;
    border-radius: 5px;
    margin: auto;
    text-align:center;
}
a{
    text-decoration:none;
    color: #0f0f0f;
    font-family: cursive;
}
span{
    font-family:Arial;
    color:#FFFFFF
}

Thank you again for your help!


#2

Try <a href="google.com">

Else, try using another browser.


#3

Thanks! The double quotes work I guess. Is it because codecademy hard checks your program rather then its functionality?


#4

Yes, although I would personally always use double quotes in HTML. I rarely see single quotes for that language.

You'll find more single quotes in Javascript or PHP, for example.


#5

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