0

What is the difference between </br> and <br /> in html

9th Oct 2023, 5:41 PM
NAIMUL HASAN
NAIMUL HASAN - avatar
7 Respuestas
+ 5
</br> is not a valid html tag. <br/> is a valid html tag.
9th Oct 2023, 5:45 PM
Lisa
Lisa - avatar
+ 6
most browsers are quite error tolerant the most recent version to write it correctly is <br>. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br
9th Oct 2023, 5:50 PM
Lisa
Lisa - avatar
+ 3
</br> is not valid while <br> is valid but not strict but <br /> is the best and strict way of using line break for an empty tag
11th Oct 2023, 1:53 PM
Andrew Adakole
Andrew Adakole - avatar
+ 2
Lisa but both </br> and <br/> does same. If </br> isn’t valid then why it works?
9th Oct 2023, 5:47 PM
NAIMUL HASAN
NAIMUL HASAN - avatar
+ 2
Lisa tnx
9th Oct 2023, 5:52 PM
NAIMUL HASAN
NAIMUL HASAN - avatar
+ 1
Easiest way : eliminating / in both cases.
11th Oct 2023, 7:49 AM
Sanjay Kamath
Sanjay Kamath - avatar
+ 1
Break is a self closing Html tag. So typing it as <br/> is the best and easy way. NAIMUL HASAN
11th Oct 2023, 5:03 PM
Desmond Ampomah
Desmond Ampomah - avatar