I’m getting an error message saying that the
<a> tag must contain an href attribute but it does…?
There’s an error in your html somewhere indicated y the red circle with exclamation point. Can you link to your code so we may interact with it.
Yes, thanks, already took care of that. It was because I had DOCTYPE at the start, removed it.
That didn’t resolve the error I’m getting for the a tag though.
And also have a second error which I can’t seem to sort out… this one having to do with making the image size responsive.
I don’t see auto listed for max-width in any documentation.
also curious is the closing body tag before the style tag.
How about a link to your pen?
href is not supposed to be a tag, it’s supposed to be an attribute inside
your syntax for writing a tag i wrong
correct syntax is
<a href="your path">text you want to show </a>
If you have more questions, please don’t post images of your screen, please provide a link to your pen - it will be much easier to help you.
I learned max-width in the course , section titled Create a Media Query. Also, I just deleted it and ran the tests again and now it says ‘try max-width’ as you can see in this screen shot. Not intending to be rude, I really appreciate your help, but why do you need a link? I’m reluctant to share one because in order to learn I really need to make any corrections or changes myself to understand how it all works. Thank you
Thank you so much, I wasn’t fully comprehending the difference between a tag and an attribute. Much appreciated.
Ah, ok! Total newbie, didn’t know that was the standard. Thanks
Only you can change your pen. Anyone else changes a copy. Yours is never affected. I want to test my assumptions
Ok, no problem. Thanks for explaining. https://codepen.io/rosiegk/pen/mdMrmEy
You have to use the href inside the
<a> tag like this:
<a href='your link'>
Under the down arrow in the codepen editor you can analyze your code to find errors. Then running the tests gave me the feedback (error messages) to succesfully complete the project.
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 (’).
Ok, so I did that and I see it’s saying special characters must be escaped, and I saw that further down it was telling me what line to look at. I made a slight change (don’t remember anymore what it was) and that information disappeared but the error is still coming up…?
When I run the tests, I see this error message
<img> element should responsively resize, relative to the width of its parent element, without exceeding its original size.
Use the “display” style property with a value of “block” for responsive images.: expected ‘inline-block’ to equal ‘block’
You need to make those changes to your code.
Also, you should delete the style tags and move all of your css to the css section.
Now that you are building projects ,you should keep your html and css separate for cleaner code.
But also for here you are missing the
a in the anchor tag.
You did it correctly here
<a id="tribute-link" href="https://en.wikipedia.org/wiki/Isabel_Allende" target="_blank">Learn more about Isabel Allende</a>
Thank you, I did not know that every href needed an anchor tag.