<img> tag variations?

I have found the Wordpress Openverse to be a good place to find photos because it provides students with HTML code they can use to create attributions/licensing info for their pictures. However, the HTML code they provide includes tags that end with the tag that we are not using in WebLab. I am guessing this is obsolete HTML. Is that correct? Removing the tags makes the code work just fine.

@jwilson25 ,

If you’re referring to the html they give you for crediting the source, it’s not obsolete. They’re just using a lot of formatting and styling to keep it consistent in whatever page you add it to. It seems a bit overkill to me, but it’s legitimate code.


Thanks, Mike. The code works, but it includes tags that WebLab colors RED. Removing these tags removes the WebLab errors and the code still works.

Looking at W3Schools, the tag is not described there. It seems that at the least is an optional tag. Perhaps it is from an earlier version of HTML?


If you could share a link with me, I’d be happy to look at it and let you know for sure. The links I saw when I visited the site didn’t look out of order, but I’m happy to take a look if you send me an example either on the page or just a copied and pasted sample of the html code you found that is turning red in web lab.

Good luck!


Here is some HTML code from a photo found on openverse. I agree that it is more than required, but it produces a very nice attribution for students to use, so I have encouraged its use. To avoid the complication of removing the offending tags, I have told students they can use the plain text option instead.

"Man walking dog, parrot" by Kevins' Collections is licensed under CC BY-NC-SA 2.0 .

Thanks for your input on this, Mike.



I see what you are saying now. They include the closing img tags: </img>.

You are correct. They are not standard html5. They are still required in xhtml which is a more strict version of html, but I’m honestly not even sure why someone would choose to use xhtml instead of html. There’s probably a reason.

The browser will accept them, but since Web Lab is a training tool, it rejects them and colors them pink because they are not used in html5.

So, keep them or delete them. Either way is fine. I would tell my students to delete them just to get in the habit of using the more commonly accepted and widely used version of html (html5).


Thanks, Mike!

Here’s some info I found on why one might use XHTML.

However, it does not appear that the </img> tag is part of XHTML. I’m still not sure where the </img> tag comes from, but it’s clear it is not necessary.


You’re right. I can’t find any version of HTML that uses a closing </img> tag and even XHTML and HTML 4.01 just use a closing slash at the end of the <img> tag itself.

I guess it will have to be a mystery as to why they include it in their citations.