Although the <br> tag is go to the next line.. | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

Although the <br> tag is go to the next line..

Why its called as a inline element not block?

23rd Jul 2020, 4:56 AM
sid
sid - avatar
1 Antwort
+ 3
sid <br> tag doesn't go to the next line. <br> tag just break to the new line. Block elements always start from new line but inline elements can be write in same line. For example div tag is block element and span is inline element. So we write <div> <span></span><span></span><br><br> </div> Here I have written br tag with span tag so br tag is also a inline element. But you can't write block elements with inline elements. For example <div></div><span></span><br> //this will be wrong You can write inline elements inside block elements. But as br tag is not block element so you can't write inline element in br tag. For example: <br><span></span><br> it would be wrong Because here br tag doesn't have closing block.
23rd Jul 2020, 5:07 AM
A͢J
A͢J - avatar