Can someone explain div and id's

My worry is that if you trow it on them at start they will just don’t understand it because they don’t have enough knowledge to understand why it is important. So they wont use it properly and wont learn it later because they “already learned it”.

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 .

Sorry… these are the instuctions

Perhaps. I would hazard it depends on the individual.

1 Like

Your “img-caption” is not container with text in it, it is “image”, because you use <img> tag for it.

Edit: it should look something like this:

<div id="img-div">
  <img id="image">
  <div id="img-caption">
     <p>Some text</p>
  </div>
</div>

<p> tag stands for paragraph and is used to hold normal text usually.

1 Like

wow okay thank you lots

In other words, just because you already have one div, does not mean you can not place another one inside. You can easily place as many “boxes in the box” as you want.

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" ).

Okay im real lost here.

<a id=“tribute-link”

If you still lost at this point, you need to stop.

Stop, and retrack to first lessons on HTML, then redo them.

2 Likes

I was thinking, “Did I put the id=main on my body on that challenge?” I just looked. Nope. :stuck_out_tongue: Every single line was a div. I was too concerned with getting the rest of it right. I learned tags the next challenge. You are correct, bad habits aren’t good but, I also feel that the first challenge, it’s maybe okay to focus on everything except tags, when coding it. Then going back after and start replacing them. Good advice though. And great explanation.

1 Like

actually, if you color a <div> tag using css, you can see it. they are not an invisible section of void.

Did not say it is void, only said it does not do anything visible and just divides document. But yes, you can give it background color etc.

1 Like