can you put images outside a body tag? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

can you put images outside a body tag?

I can do this to link the tree picture to google: <html> <head> <title>first page</title> </head> <body> <a href = "http://www.google.com"> <img src="http://www.sololearn.com/images/tree.jpg" alt="" /> </a> </body> </html> but, when I use just the link tag with the image nothing happens without being in the body tag, however the link tag by itself does work with text, and again trying to link with the image without the body does not work. what's going on here, is it something with the syntax? I hope this makes sense.

14th Aug 2016, 11:35 PM
Frank Gunsch
Frank Gunsch - avatar
3 Answers
+ 2
no you can't
16th Aug 2016, 12:18 AM
Victor
0
you have to take image from folder in which you saved your html files
15th Aug 2016, 10:52 AM
khalsa Sukhbir singh kartar singh
khalsa Sukhbir singh kartar singh - avatar
0
Body tag is a parent of (include) any visable content on your page. It has to be inside the <body> where it belongs
16th Aug 2016, 8:19 AM
Curiosity
Curiosity - avatar