Lesson 26. Links and Text Decoration


#1



https://www.codecademy.com/en/courses/web-beginner-en-TlhFi/4/5?curriculum_id=50579fb998b470000202dc8b


I can't seem to figure out what's going on! I'm sure it's a very small error but I can't seem to figure it out. I DO have text between the a tags but it keeps telling me I "forgot." Any insights?

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


<!DOCTYPE html>
<html>
    <head>
        <link type="text/css" rel="stylesheet" href="stylesheet.css" />
        <title>Result</title>
        <h1>This Is Me</h1>
    </head>
    <p>
    Hello, this is me and my name is Kayla.
    <br>
    <br>
    <a href="http://www.theeclecticelement.com">The Eclectic Element Webpage</a>
    <br>
    <br>
    <img src="http://1.bp.blogspot.com/-Pz425B8i9Fw/U6AAf_AU9qI/AAAAAAAAR9U/ZK-9z520Qso/s1600/TheEclecticElement2.png" />
    </p>
    <body>
    </body>
</html>

h1 {
    font-family: Verdana, sans-serif;
    color: #576D94;
}
p {
    font-family: Garamond, serif;
    font-size: 18px;
    color: #4A4943
}
img {
    height: 100px;
    width: 300px;
    border: 1px solid #4682b4;
}

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


#2

You shouldn't have your images and links inside the paragraph

Close your paragraph after Kayla.


#3

Now that I wouldn't have figured out! Sadly it's still giving me the same error code.


<!DOCTYPE html>
<html>
    <head>
        <link type="text/css" rel="stylesheet" href="stylesheet.css" />
        <title>Result</title>
        <h1>This Is Me</h1>
    </head>
    <body>
    <p>
    Hello, this is me and my name is Kayla.
    </p>
    <a href="http://www.theeclecticelement.com">The Eclectic Element Webpage</a>
    <br>
    <br>
    <img src="http://1.bp.blogspot.com/-Pz425B8i9Fw/U6AAf_AU9qI/AAAAAAAAR9U/ZK-9z520Qso/s1600/TheEclecticElement2.png" />
    </body>
</html>


#4

I don't see any error reset your lesson and paste in your code again or refresh the page

You could also take out the br tags as not required


#5

I tried refreshing my lesson, resetting the code multiple times, moving the body tags, moving the paragraph tags, added and took away the br tags but I STILL am getting the same error code about not having any text in my a tags.

This is generally the same code I write every time.


<!DOCTYPE html>
<html>
	<head>
	    <link type="text/css" rel="stylesheet" href="stylesheet.css" />
		<title>Result</title>
		<h1>This Is Me</h1>
	</head>
	<body>
	<p>
	Hello, this is me and my name is Kayla.
	<p>
	<a href="http://www.theeclecticelement.com">The Eclectic Element Website</a>
	<img src="http://1.bp.blogspot.com/-Pz425B8i9Fw/U6AAf_AU9qI/AAAAAAAAR9U/ZK-9z520Qso/s1600/TheEclecticElement2.png" />
	</body>
</html>


h1 {
    font-family: Verdana, sans-serif;
    color: #576D94;
}
p {
    font-family: Garamond, serif;
    font-size: 18px;
    color: #4A4943
}
img {
    height: 100px;
    width: 300px;
    border: 1px solid #4682b4;
}
a {
    text-decoration: none;
    color: #cc0000;
}


#6

Your h1 tag should be in body not head..

Your paragraph tag is not closed as you are missing /


#7

Okay, both things have been changed! Still giving me the same error message. Anything else you can spot that I can give a try? Here's the new coding:


<!DOCTYPE html>
<html>
    <head>
        <link type="text/css" rel="stylesheet" href="stylesheet.css" />
        <title>Result</title>
    </head>
    <body>
    <h1>This Is Me</h1>
    <p>
    Hello, this is me and my name is Kayla.
    </p>
    <a href="http://www.theeclecticelement.com"> The Eclectic Element Website </a>
    <img src="http://1.bp.blogspot.com/-Pz425B8i9Fw/U6AAf_AU9qI/AAAAAAAAR9U/ZK-9z520Qso/s1600/TheEclecticElement2.png" />
    </body>
</html>


#8

I don't know.. I don't see any mistake ..

Please paste in your CSS

Are you sure this is the lesson you talking about ?
Please try refresh again sorry :slight_smile:


#9

No problem, thank you so much for helping me try to figure this out! It's driving me absolutely nuts. LOL

That's the exact lesson I'm on but I don't understand how you got a congratulations while I still get the error code. I even refreshed it again and reset the coding:

Here's my CSS coding:


h1 {
    font-family: Verdana, sans-serif;
    color: #576D94;
}
p {
    font-family: Garamond, serif;
    font-size: 18px;
    color: #4A4943
}
img {
    height: 100px;
    width: 300px;
    border: 1px solid #4682b4;
}
a {
    text-decoration: none;
    color: #cc0000;
}


#10

try leaving a space between your text in the a tag
instead of:

<a href="http://www.theeclecticelement.com">The Eclectic Element Website</a>

rather do this:

<a href="http://www.theeclecticelement.com"> The Eclectic Element Website </a>

also remove <br>


#11

I tried doing both, leaving no spaces and leaving a space between like you suggested and it doesn't make a difference. I've also added and removed the br several times and that doesn't seem to make a difference either. I'm honestly stumped!

Can you move on to the next lesson without completing this final step? If that's possible maybe that's what I'll do.


#12

You click on this link and it would take you to the overview of all sections in the course you can locate to the next one..


#13

Wonderful, I think that's what I'll do. Thank you so much again for your help! :slight_smile:


#14

You're welcome :green_heart:

I'm sorry I couldn't help you solve it, I will see if I can find the solution and let you know :slight_smile:

Happy Learning :slightly_smiling:
Happy coding !

What inspired you to learn programming/coding?
Join the discussion


#16

Please do! It looks like it's doing it to me again in a different lesson so if you find anything let me know :slight_smile:


#17

If this lesson is still giving you trouble, change the order of the img and the link.

<!DOCTYPE html>
<html>
    <head>
        <link type="text/css" rel="stylesheet" href="stylesheet.css" />
        <title>Result</title>
    </head>
    <body>
    <h1>This Is Me</h1>
    <p>Hello, this is me and my name is Kayla.</p>
    <img src="http://1.bp.blogspot.com/-Pz425B8i9Fw/U6AAf_AU9qI/AAAAAAAAR9U/ZK-9z520Qso/s1600/TheEclecticElement2.png" />
    <a href="http://www.theeclecticelement.com"> The Eclectic Element Website </a>
    </body>
</html>

#18

Thank you for the suggestion! I gave it a try but alas, I'm still getting the error. It seems like I'm either missing something really small or it's a glitch because it's continued in other lessons :frowning:


#19

It is sometimes necessary to Reset and Refresh so the cache is cleared of previous submissions.

After reseting, add the CSS for the link (on the .css tab), and paste the above sample into the HTML.


#20

It's my problem too i cannot complete this lesson 26 i was frustrating


#21

Same. Pretty sure my code is fine... It LOOKS like it's meant to and everything, I'm almost certain that it's a glitch.

I've tried the anchor tags inside of the paragraph, outside of the paragraph, before and after the image, before and after the paragraph... Everything I could think of.

Tried changing the href, changing the text, adding spaces, removing non-alphanumeric characters, one word, many words... No luck.

I had a flash of insight where I realized that I didn't use a closing / in my <img> tag (which I'm still skeptical that I really need º_º) but still no dice. Not that that should trigger an error for my <a> tag anyway. I'm 90% sure this is just a glitch, but I really need to have this lesson passed :\