+ 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...
8 ответов
+ 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="" />
+ 2
@manish That's totally wrong syntax and thinking. 'src' is an attribute for <img>. Attributes can't be outside the < and >.
+ 1
so <img src="img.jpg"alt="">
is the proper form of html?
+ 1
so I can use this further right? ??
anyway thank you Zinc for clearing me this..☺☺
+ 1
yeah absolutely @zinc ... attributes can't be outside <> @manish..
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>
0
@zinc I think I studied about this somewhere which I can't recall
0
👍👍