Hi there, newbie coder here
I’m doing the Tribute page and for some reason the requirement for the anchor challenge isn’t working.
Here are the instructions for the part I’m stuck on: User Story #7: I should see an a element with a corresponding id=“tribute-link”, which links to an outside site that contains additional information about the subject of the tribute page. HINT: You must give your element an attribute of target and set it to _blank in order for your link to open in a new tab (i.e. target="_blank").
And here’s the code I have, which isn’t working:
<p id="moreinfo"> For more about this incredible composer, check out his
<a id="tribute-link" href = "https://en.wikipedia.org/wiki/Stephen_Sondheim" target="_blank"> Wikipedia</a> page. </p>
Any help would be much appreciated!
<p id="moreinfo">For more about this incredible composer, check out his
<a id="tribute-link" href="https://en.wikipedia.org/wiki/Stephen_Sondheim" target="_blank">Wikipedia</a> page.</p>
After href cant be space
href=" must be! Also after p tag is no need space to write text! And again for a tag no need space only after a tag when used link. So remove space from Wikipedia.
You should be passing #7 with the code you have. The syntax is valid but I wouldn’t suggest using it (i.e. adding spaces)
Do you have a Codepen for the project so we can see it?
I see this test not passing, not the one you are saying:
- Within the “img-div” element, I should see an element with a corresponding id=“img-caption” that contains textual content describing the image shown in “img-div”.
your code there is this:
<img id="image" src="https://karsh.org/wordpress/wp-content/uploads/2017/02/Yousuf-Karsh-Stephen-Sondheim-1986-1462x1960.jpg" alt="Sondheim">
<p id="img-caption" >Stephen Sondheim directing Company in 1973.</p>
<img id="img2" src="https://www.stlmag.com/downloads/281643/download/stephen_sondheim.jpg?cb=41a95bd2c716ea8b18acce125df82b17&w=800&h=" alt="Sondheim">
Ok thanks! I did the change you suggested and it works! (Not sure why #7 wasn’t working before, but now it seems to be fine).