# Help with this error?

**URL:** <https://forum.freecodecamp.org/t/help-with-this-error/482716>\
**Category:** Curriculum Help\
**Tags:** html, css\
**Created:** [October 22, 2021, 4:27am UTC](https://forum.freecodecamp.org/t/help-with-this-error/482716 "2021-10-22T04:27:30Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![rosiek](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/rosiek/32/134387_2.png) [@rosiek](https://forum.freecodecamp.org/u/rosiek)\
**Post date:** [October 22, 2021, 4:27am UTC](https://forum.freecodecamp.org/t/help-with-this-error/482716/1 "2021-10-22T04:27:30Z")

</div>

I’m getting an error message saying that the `<a>` tag must contain an href attribute but it does…?

 ![Screen Shot 2021-10-21 at 9.23.00 PM](https://global.discourse-cdn.com/freecodecamp/original/3X/4/4/44a46e0a69f92c569a6394f2070b21818639ad52.png)

---

<div class="post-metadata">

**Author:** ![tlc35us](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@tlc35us](https://forum.freecodecamp.org/u/tlc35us)\
**Post date:** [October 22, 2021, 4:37am UTC](https://forum.freecodecamp.org/t/help-with-this-error/482716/2 "2021-10-22T04:37:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rosiek](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/rosiek/32/134387_2.png) [@rosiek](https://forum.freecodecamp.org/u/rosiek)\
**Post date:** [October 22, 2021, 5:03am UTC](https://forum.freecodecamp.org/t/help-with-this-error/482716/3 "2021-10-22T05:03:01Z")

</div>

Yes, thanks, already took care of that. It was because I had DOCTYPE at the start, removed it.

---

<div class="post-metadata">

**Author:** ![rosiek](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/rosiek/32/134387_2.png) [@rosiek](https://forum.freecodecamp.org/u/rosiek)\
**Post date:** [October 22, 2021, 5:05am UTC](https://forum.freecodecamp.org/t/help-with-this-error/482716/4 "2021-10-22T05:05:11Z")

</div>

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.

 ![Screen Shot 2021-10-21 at 10.02.17 PM](https://global.discourse-cdn.com/freecodecamp/original/3X/7/f/7fb3fd9cd30e4cce54ca2833ccb65fb1ad9430ff.png)

Thanks

---

<div class="post-metadata">

**Author:** ![tlc35us](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@tlc35us](https://forum.freecodecamp.org/u/tlc35us)\
**Post date:** [October 22, 2021, 6:37am UTC](https://forum.freecodecamp.org/t/help-with-this-error/482716/5 "2021-10-22T06:37:30Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![iHassan-NG](https://avatars.discourse-cdn.com/v4/letter/i/aeb1de/32.png) [@iHassan-NG](https://forum.freecodecamp.org/u/iHassan-NG)\
**Post date:** [October 22, 2021, 12:09pm UTC](https://forum.freecodecamp.org/t/help-with-this-error/482716/6 "2021-10-22T12:09:19Z")

</div>

Your `href` is not supposed to be a tag, it’s supposed to be an attribute inside `a` tag

```auto
<a href=""></a>

```

Not `<a><href>`

---

<div class="post-metadata">

**Author:** ![rio\_sanap](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/rio_sanap/32/236783_2.png) [@rio\_sanap](https://forum.freecodecamp.org/u/rio_sanap)\
**Post date:** [October 22, 2021, 1:05pm UTC](https://forum.freecodecamp.org/t/help-with-this-error/482716/7 "2021-10-22T13:05:25Z")

</div>

your syntax for writing a tag i wrong

correct syntax is

```auto
<a href="your path">text you want to show </a>

```

---

<div class="post-metadata">

**Author:** ![kevinSmith](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/kevinsmith/32/72934_2.png) [@kevinSmith](https://forum.freecodecamp.org/u/kevinSmith)\
**Post date:** [October 22, 2021, 2:39pm UTC](https://forum.freecodecamp.org/t/help-with-this-error/482716/8 "2021-10-22T14:39:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rosiek](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/rosiek/32/134387_2.png) [@rosiek](https://forum.freecodecamp.org/u/rosiek)\
**Post date:** [October 22, 2021, 4:37pm UTC](https://forum.freecodecamp.org/t/help-with-this-error/482716/9 "2021-10-22T16:37:16Z")

</div>

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

 ![Screen Shot 2021-10-22 at 9.27.40 AM](https://global.discourse-cdn.com/freecodecamp/original/3X/6/5/65d7e87fc6d43d75eadc3c0f090ad37b7a70267e.png)

---

<div class="post-metadata">

**Author:** ![rosiek](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/rosiek/32/134387_2.png) [@rosiek](https://forum.freecodecamp.org/u/rosiek)\
**Post date:** [October 22, 2021, 4:39pm UTC](https://forum.freecodecamp.org/t/help-with-this-error/482716/10 "2021-10-22T16:39:24Z")

</div>

Thank you so much, I wasn’t fully comprehending the difference between a tag and an attribute. Much appreciated.

---

<div class="post-metadata">

**Author:** ![rosiek](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/rosiek/32/134387_2.png) [@rosiek](https://forum.freecodecamp.org/u/rosiek)\
**Post date:** [October 22, 2021, 4:40pm UTC](https://forum.freecodecamp.org/t/help-with-this-error/482716/11 "2021-10-22T16:40:06Z")

</div>

Ah, ok! Total newbie, didn’t know that was the standard. Thanks

---

<div class="post-metadata">

**Author:** ![tlc35us](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@tlc35us](https://forum.freecodecamp.org/u/tlc35us)\
**Post date:** [October 22, 2021, 4:40pm UTC](https://forum.freecodecamp.org/t/help-with-this-error/482716/12 "2021-10-22T16:40:08Z")

</div>

Only you can change your pen. Anyone else changes a copy. Yours is never affected. I want to test my assumptions

---

<div class="post-metadata">

**Author:** ![rosiek](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/rosiek/32/134387_2.png) [@rosiek](https://forum.freecodecamp.org/u/rosiek)\
**Post date:** [October 22, 2021, 4:40pm UTC](https://forum.freecodecamp.org/t/help-with-this-error/482716/13 "2021-10-22T16:40:42Z")

</div>

Ok, no problem. Thanks for explaining. [https://codepen.io/rosiegk/pen/mdMrmEy](https://codepen.io/rosiegk/pen/mdMrmEy)

---

<div class="post-metadata">

**Author:** ![DivyanshuBatta](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/divyanshubatta/32/236647_2.png) [@DivyanshuBatta](https://forum.freecodecamp.org/u/DivyanshuBatta)\
**Post date:** [October 22, 2021, 4:48pm UTC](https://forum.freecodecamp.org/t/help-with-this-error/482716/14 "2021-10-22T16:48:31Z")

</div>

You have to use the **href** inside the `<a>` tag like this:  
`<a href='your link'>`

---

<div class="post-metadata">

**Author:** ![tlc35us](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@tlc35us](https://forum.freecodecamp.org/u/tlc35us)\
**Post date:** [October 22, 2021, 4:49pm UTC](https://forum.freecodecamp.org/t/help-with-this-error/482716/15 "2021-10-22T16:49:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jwilkins.oboe](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jwilkins.oboe/32/179497_2.png) [@jwilkins.oboe](https://forum.freecodecamp.org/u/jwilkins.oboe)\
**Post date:** [October 22, 2021, 5:18pm UTC](https://forum.freecodecamp.org/t/help-with-this-error/482716/16 "2021-10-22T17:18:20Z")

</div>

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.

 ![Pre-formatted-text](https://global.discourse-cdn.com/freecodecamp/original/3X/1/b/1b18854f1059217f29370444396145cc3a0cd8ae.gif)

See [this post](https://forum.freecodecamp.org/t/forum-code-formatting/25574) to find the backtick on your keyboard.  
**Note:** Backticks (`) are not single quotes (’).

---

<div class="post-metadata">

**Author:** ![rosiek](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/rosiek/32/134387_2.png) [@rosiek](https://forum.freecodecamp.org/u/rosiek)\
**Post date:** [October 22, 2021, 5:53pm UTC](https://forum.freecodecamp.org/t/help-with-this-error/482716/17 "2021-10-22T17:53:40Z")

</div>

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…?

---

<div class="post-metadata">

**Author:** ![jwilkins.oboe](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jwilkins.oboe/32/179497_2.png) [@jwilkins.oboe](https://forum.freecodecamp.org/u/jwilkins.oboe)\
**Post date:** [October 22, 2021, 6:04pm UTC](https://forum.freecodecamp.org/t/help-with-this-error/482716/18 "2021-10-22T18:04:31Z")

</div>

> [@rosiek](#):
>
> but the error is still coming up…?

When I run the tests, I see this error message  
The `<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.

---

<div class="post-metadata">

**Author:** ![jwilkins.oboe](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jwilkins.oboe/32/179497_2.png) [@jwilkins.oboe](https://forum.freecodecamp.org/u/jwilkins.oboe)\
**Post date:** [October 22, 2021, 6:07pm UTC](https://forum.freecodecamp.org/t/help-with-this-error/482716/19 "2021-10-22T18:07:05Z")

</div>

But also for here you are missing the `a` in the anchor tag.

```auto
<href="https://hbr.org/resources/images/article_assets/2016/03/R1605L_KELLY.jpg" target="_blank">

```

You did it correctly here

```auto
    <a id="tribute-link" href="https://en.wikipedia.org/wiki/Isabel_Allende" target="_blank">Learn more about Isabel Allende</a>

```

---

<div class="post-metadata">

**Author:** ![rosiek](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/rosiek/32/134387_2.png) [@rosiek](https://forum.freecodecamp.org/u/rosiek)\
**Post date:** [October 22, 2021, 8:08pm UTC](https://forum.freecodecamp.org/t/help-with-this-error/482716/20 "2021-10-22T20:08:32Z")

</div>

Thank you, I did not know that every href needed an anchor tag.

[Next page](https://forum.freecodecamp.org/t/help-with-this-error/482716.md?page=2)
