FAQ: Learn HTML - Intro to HTML - Attributes

what is wrong? because my answer is not being accepted?

The Brown Bear

<h2>About Brown Bears</h2>

<h3>Species</h3>

<h3>Features</h3>
<h2>Habitat</h2>

<h3>Countries with Large Brown Bear Populations</h3>

<h3>Countries with Small Brown Bear Populations</h3>
<h2>Media</h2>

Did you add the respective id attribute to the divs? For example: <div id="introduction"> and so on.

Also, check out this guide on how to format your code so that we can see it correctly as text and not displayed as html elements.


Hey hows it going everyone, I am quite stumped at this point I have done everything that is said, Ive made sure my letters arent capitalized however its not going through. I am able to actually use the functions successfully but apparently there are errors.

Wrong thread.
This thread is about the exercise “Attributes”
Your question is about the exercise “Linking to Same Page”. The thread for that exercise is: FAQ: Learn HTML - Common HTML Elements - Linking to Same Page

Anyways, in your screenshot, the ids and hrefs are correct. They are all lowercase as specified.

Step 1 specifies that the text of the list items should be:
"Introduction, Habitat, Media"
You have:
"introduction, habitat, media"

Thank you and I do apologize, on the said activity page it directly linked me to here. Im new so still getting used to things, thanks for your help I have now passed this!

1 Like

so i just got to the attributes section of the lesson, and found out that adding an “id=‘value’”, i was receiving errors, and the errors only stopped when i put a space before the value of the attribute. is this normal or something was up?

It would help to see the markup and the error message. The only time we need a space is in front of the attribute.

<div id="first" class="content">
    ^          ^

Visually is the way I formatted the code acceptable?

I noticed for <div id="introduction"> when I add a closing </div> at the end it gives me an error on line 7.
I’m assuming it’s because there’s already a closing </div> tag on line 7.

My question is, is this correct? Or should I remove the closing </div> tag on line 7 and put it on line 3 or below on line 4?

Divs

Hi,
I think the you have missing out the closing brackets of the opening tag in line 11 and line 16.
I think it should be <div id = “habitat”> and <div id = “media” >.
Thanks


the id introduction on the left is why i wrote the right one is the correct according to code academy my answer doesnt count as a correct answer the only difference i notice is the color of the command, i dont know if is necessary to write it in color, but i still dont know how to do it

The color is different because there is a syntax error. Remove the > before id="...">.

1 Like

thank u i didnt notice that

1 Like