In HTML ,when dealing with self closing tags like <br>, <img> etc. Please,which one of the following is best to use: | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 5

In HTML ,when dealing with self closing tags like <br>, <img> etc. Please,which one of the following is best to use:

1. The one with ending slash eg; <br/> 2. The one without ending slash eg; <br> Please I need more explanation on thisšŸ™

10th Jul 2021, 4:05 PM
Adeyemi Adeoye Abdulgafar
Adeyemi Adeoye Abdulgafar - avatar
3 Respostas
+ 13
For me The one without /
11th Jul 2021, 6:13 PM
Jano cĢ½Ķ“oĢ½Ķ“dĢ½Ķ“eĢ½Ķ“rĢ½Ķ“
Jano cĢ½Ķ“oĢ½Ķ“dĢ½Ķ“eĢ½Ķ“rĢ½Ķ“ - avatar
+ 1
The best practice is to use /. It is possible that your web editor read and run it correctly. But when you carrry out this practice in react latter on .. It will throw an error so better to be in good habbits.
11th Jul 2021, 9:12 AM
Divya Mohan
Divya Mohan - avatar
0
br tag
21st Jul 2021, 11:30 AM
Badal Parida