Question about creating hyperlinks article

Why does the creating hyperlinks article refer to images an block level elements?

Hi @church_craig

Do you mean this paragraph?

As mentioned before, almost any content can be made into a link, even block-level elements. If you have an image you want to make into a link, use the <a> element and reference the image file with the <img> element.

I guess it’s to make sure learners understand that links aren’t just used on text (the classic use case).

Michael

Yeah, that’s the one.

Did Chris Mills write that?

It’s possible. This part is from a time when MDN was still a wiki. We don’t have detailed stats who edited what from that time. I just see that he was one of multiple contributors on that page.

Do you think there’s something wrong with that paragraph?

Yes because the image element is considered an inline element.

Ah, now I understand. I read it as “anything including block level elements”. And then <img> is an example of “anything”. But since the heading is “Block level links” this doesn’t really make sense.

Can you please open an issue on GitHub?
Thank you!

I opened the issue on github.

1 Like