Asked 2 years ago
17 May 2022
Views 638
steave

steave posted

Stray end tag img

i am using W3C validator to test my website's Html markup
and get this below image

Error: Stray start tag img.
From line 529, column 84; to line 529, column 141
i=index" ><img src="image.jpg" alt="en" /></opti


Stray end tag img
code is as below

<select>
<option  ><img src="image.jpg" alt="en" /></option>
</select>


so what could be the solution for the error Stray end tag img ?
hanuman

hanuman
answered May 20 '22 00:00

Stray end tag img
it means some issue with the end of the img tag , so maybe it is not closed properly or you missed needed attributes at end
pratik

pratik
answered May 17 '22 00:00

XHTML : <img src="" alt="" />
close the img tag with />
HTML5 : <img src="" alt="">
dont close the img tag with />
Post Answer