What's the correct <img /> or <img>? in HTML/XHTML Posted April 7, 2014 · Edited April 7, 2014 by Trimax What is the correct format for the non-pair tag like img or link in HTML5? In some sites I've read <img src="" />, with the slash at final, but in other sites (like w3schools) the format is <img src="" > without the slash. It works in both cases but I think there should be only one right way. Thanks!
What's the correct <img /> or <img>?
in HTML/XHTML
Posted · Edited by Trimax
What is the correct format for the non-pair tag like img or link in HTML5?
In some sites I've read <img src="" />, with the slash at final, but in other sites (like w3schools) the format is <img src="" > without the slash.
It works in both cases but I think there should be only one right way.
Thanks!