+ 8

Is there a difference between these closing tags

> and />

6th Mar 2017, 10:03 AM
kimwele
kimwele - avatar
2 Answers
+ 5
> is html, /> is for xml and xhtml, which imo is better for using a standardized syntax, at least for html4. now that html5 is becoming the standard instead that doesn't seem to be as much of a big deal (although i always prefer the 'self closing' tag when i code, still to this day i can't write <br> i always go with <br />, guess im still self validating code in my head lol)
6th Mar 2017, 10:12 AM
William La Flamme
William La Flamme - avatar
+ 2
no... both of them work fine... but it's better to use /> because your HTML code might get errors in Validation of code. so /> is better to use instead of >
6th Mar 2017, 10:14 AM
MHM 13
MHM 13 - avatar