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!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 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 ответов
+ 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