Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML Introduction to HTML and CSS HTML: The Structural Foundation of Web Pages and Applications Anchor Tags

The content between my anchor tags after saving my html code disappear on the site when refreshed.

If I remove the anchor tags, save, and then refresh, the words come back : "This is a third paragraph."

6 Answers

Hi Austin, thanks for sending me a snapshot of your workspace. So, because of this rule here in your CSS:

a {
  text-decoration: none;
  color: white;
}

...since you wrapped the text "This is a third paragraph" in <a> tags, that rule is being applied to the text, and since you already have a white background, it looks like the text disappeared. But actually it's still there, and if you hover over it you can can see the hover rule being applied (blue text).

What you want to do in a situation like this is get more specific with your code. I created and added this rule because it uses a descendant selector to specify that I want to target the <a> of a <p>:

p a {
  text-decoration: none;
  color: black;
}

This takes care of your issue! Also, you still want to keep the original rule for <a> as well! Otherwise all of your other <a> elements won't be styled.

Hi Austin, you might need to do a hard-refresh on your browser to clear the cache: ctrl + shift + R usually works. Also ctrl + f5 in Chrome.

Still not working I'm not sure what's wrong with it. As soon as I insert my anchor tags, the text disappears. When I remove the anchor tags, the text comes back. Thank you Bert.

Can you fork your workspace and provide the link so I can check out your code?

Yes sir how can I do that?

Sorry actually you want to create a snapshot and then share the link with me. This video explains how: https://teamtreehouse.com/library/previews-and-snapshots

Thank you very much for your help Bert, I really appreciate it! What do you mean by keep the original rule for <a> ?

Keep this rule:

a {
  text-decoration: none;
  color: white;
}

And you are very welcome!