This forum is now read-only. Please use our new forums! Go to forums

banner
Close banner
0 points
Submitted by david goldberg
about 10 years

Why won't it recognize what's between my <a></a> tags??

I’m so frustrated cause I can’t figure out what the error is, Please Help. I’ve put the error and code below

Error: Oops, try again. Did you remember to put some link text between your tags? You can’t leave them empty!

Code:

<!DOCTYPE html>
<html>
    <head>
       	    <link type="text/css" rel="stylesheet" href="stylesheet.css">
        	<title>Result</title>
            <a 
    </head>
    <body>
            <h1>David Goldberg</H1>
                <p>This is my Happy Face </p>
                   <img src="http://shihtzustaff.files.wordpress.com/2013/11/o-rob-ford-facebook.jpg"/>
                   <a href="www.thestar.com">The STAR!*</a>
    </body>
</html>

Answer 532ba6a952f863fcfc001fd7

1 vote

Permalink

I don’t know which lesson this is so I can’t compare with the original instructions.

However there is something missing on your a link, the http:// Here’s a sample on how it’s supposed to be:

<a href="http://www.thestar.com">The STAR!</a>
points
Submitted by tony de araujo
about 10 years

1 comments

david goldberg about 10 years

This is the Link and Text Decoration lesson of the CSS: An Overview course. I added the Http:// but still am receiving the same error.

Thanks for trying!

Answer 532d6367631fe9805e002b09

1 vote

Permalink

why should you put a backslash after .com? a link tag isn’t self closing. <a href="http://www.thestar.com">the star!</a> this should work. why is there <a before the closing head tag?

points
Submitted by stetim94
about 10 years

3 comments

tony de araujo about 10 years

Speaking of forward slash (just as a curiosity, nothing to do with this lesson), when we code codecademy.com we get there in two steps, first the default folder, then the index html. When we code codecademy.com/ it only takes one step to get there so it is a bit faster.

stetim94 about 10 years

so the slash is a good idea? what is a bit faster? 10ms?

tony de araujo about 10 years

don’t know how fast it is. I do use it when I code a link on a web page just to speed up my readers usability. I suppose in a website with thousands of links ( I have one like that) it may make a difference. But this has nothing to do with this exercise and you are right, no need to code it here.

Answer 532c5b5480ff338476000b91

0 votes

Permalink

This is lesson 21/26.

Your HTML code passed validation even without the HTTP://

Did you do the CSS part? It should look like this:

a {
    color: #cc0000;
    text-decoration: none;
}

If you did, try refreshing the browser by pressing CTRL f5 if on Windows or CMD f5 if on a MAC.

Last alternative: try passing by logging in with a different browser.

points
Submitted by tony de araujo
about 10 years

Answer 532d0aaf631fe99e1b0023e1

0 votes

Permalink

<a href="http://www.thestar.com/">The STAR!</a>
You forgot to put a forward slash after the ".com"
points
Submitted by Super Rambo
about 10 years

Answer 532da57b8c1ccc0f080035a0

0 votes

Permalink

<a href="google.com">Click Me!</a>
points
Submitted by Super Rambo
about 10 years

Answer 532dadbe80ff33744200392d

0 votes

Permalink

speaking about offtopic question. I stumbled accros two ways to define a button: <button></button> and <input type="button" /> Is is true that input type button is better to use?

points
Submitted by stetim94
about 10 years

6 comments

tony de araujo about 10 years

I came across that question yesterday somewhere. Here’s a great article about it: http://web.archive.org/web/20110721191046/http://particletree.com/features/rediscovering-the-button-element/

stetim94 about 10 years

thank you :)

stetim94 about 10 years

i came across this article yesterday, did not completely understand it yet. will take more time to read it today.

tony de araujo about 10 years

Basically the input tag is very flexible because we can make it almost anything we want including a button. However, in older browsers it defaults to the text value. So if you plan to create a button, the button tag is more backwards compatible than the input tag. Moving forward, the input will become more popular.

stetim94 about 10 years

why will the input type button become more popular?

tony de araujo about 10 years

If I go to the supermarket to purchase a tool and I see one named input that does everything, and another one named buttons that only does buttons, I get the input. Unless of course I have some extra money and buttons have a 90% discount. Then I will buy some buttons and use them when I need buttons because they cost me less money. All kidding aside, the input is more modern and consistent. Here’s what W3 says about it: “If you use the