+ 1

do images have opening and closing tags?

in 1st page, there exists that image does not have a closing tag then how it exists a closing tag in below example?? someone clear me pls...

20th Jul 2016, 1:18 AM
Harshini Muthu
Harshini Muthu - avatar
8 Antworten
+ 2
This is the correct syntax in HTML5 (No closing tag needed): <img src="img.png" alt=""> If you see the following syntax used, it's from the time of XHTML.: <img src="img.png" alt="" />
20th Jul 2016, 1:27 AM
ZinC
ZinC - avatar
+ 2
@manish That's totally wrong syntax and thinking. 'src' is an attribute for <img>. Attributes can't be outside the < and >.
20th Jul 2016, 11:12 AM
ZinC
ZinC - avatar
+ 1
so <img src="img.jpg"alt=""> is the proper form of html?
20th Jul 2016, 1:30 AM
Harshini Muthu
Harshini Muthu - avatar
+ 1
so I can use this further right? ?? anyway thank you Zinc for clearing me this..☺☺
20th Jul 2016, 1:31 AM
Harshini Muthu
Harshini Muthu - avatar
+ 1
yeah absolutely @zinc ... attributes can't be outside <> @manish..
20th Jul 2016, 12:45 PM
Harshini Muthu
Harshini Muthu - avatar
0
images can have closing tags if we want one of the multiple images to be printed on page as <IMG> SRC="a.png" SRC="a.jpg" <IMG>
20th Jul 2016, 7:17 AM
manish rawat
manish rawat - avatar
0
@zinc I think I studied about this somewhere which I can't recall
20th Jul 2016, 5:05 PM
manish rawat
manish rawat - avatar
0
👍👍
2nd Aug 2017, 5:55 PM
Harshini Muthu
Harshini Muthu - avatar