When I used <br>code were working but when I used <br /> it were working also why ? Is there no difference between <br> &<br/> | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

When I used <br>code were working but when I used <br /> it were working also why ? Is there no difference between <br> &<br/>

13th Jul 2018, 7:31 AM
Akash Vishwakarma
Akash Vishwakarma - avatar
6 Antworten
+ 7
Hello, Akash Vishwakarma ! The fact is that when writing <br/> developers in use XHTML, not HTML. According to the XHTML 1.0 specification, all tags that do not have a closing part must be written in the form: <tag [parameters] /> The same rule works in XML documents. In XML, all tags must be closed. In case the element does not have a closing tag (for example, <img> or <br>), you need to add a slash at the end of the tag: <img/> and <br/>. In some browsers designed for XML, the absence of a space before the slash may lead to unreadability of the tag. However, in 99.9% of cases there will be no difference. HTML interpreters usually just ignore the extra "/".
13th Jul 2018, 7:54 AM
Alexander Sokolov
Alexander Sokolov - avatar
+ 4
There is no difference at all. You can skip / as per latest addition. Hope this helps ☺️☺️.
13th Jul 2018, 7:34 AM
Meet Mehta
Meet Mehta - avatar
0
thanks
13th Jul 2018, 7:40 AM
Akash Vishwakarma
Akash Vishwakarma - avatar
13th Jul 2018, 7:55 AM
Janning⭐
Janning⭐ - avatar
0
thank you very much
13th Jul 2018, 7:58 AM
Akash Vishwakarma
Akash Vishwakarma - avatar
0
No problem. ☺👍
13th Jul 2018, 7:59 AM
Janning⭐
Janning⭐ - avatar