Hi am doing responsive web design but am stuck somewhere I cant understand the error
Here is what am required of
You can see the words cat photos
underlined next to the image in the preview now. That’s your link; feel free to give it a click. In the text of your p
element, turn the words cat photos
into a link to https://freecatphotoapp.com
. When you are done, remove the old anchor tag and text below the paragraph.
this is the code
<p>Click here to view more cat photos
<a href='https://freecatphotoapp.com'>cat photos</a>
</p>
here is the error
After nesting the anchor (a
) element, the only p
element content visible in the browser should be Click here to view more cat photos.
Double check the text, spacing, or punctuation of both the p
and nested anchor element.
You need to put a . after your anchor element.
Thanks @JeremyLT I have tried it but seems the error is not solved
What is your updated code?
<p>Click here to view more cat photos
<a href='https://freecatphotoapp.com'>cat photos.</a>
</p>
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>
) to add backticks around text.
See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').
You put the . inside of the anchor element. It needs to be after the anchor element.
Thanks for the information
1 Like
<p>Click here to view more cat photos <a href='https://freecatphotoapp.com'>cat photos</a>. </p>
like this
One more fix - the output looks like this
Click here to view more cat photos cat photos.
You have the words ‘cat photos’ twice, which is a bit awkward.
Thanks a lot @JeremyLT , that was the cause of the error
1 Like
Hi! So I just started learning responsive web design an hour ago (around the time you posted your question). The issue you’re having is that
cat photos needs to be before the words cat photos. Your
tag should be on the same line as well. Hope that helps.
I see that JeremyLT already answered the question, but I may have a simpler solution
Having the phrase ‘cat photos’ twice is wrong.
(I had written the solution, and I have read that it is not good for learning, thus erased)
it’s kinda cringe but i understand why you shouldn’t do it
1 Like