Question about <div> & <br>

Can div and br technically be used if i want two seperate divisions or is it better to keep my code clean. Because I was making labels and inputs and instead of using a division I used br… which will later be annoying in CSS I assume. I already fixed it to div but just wanted to ask.

PS: If you’re confused… Me too

<div> lets you create a sort of logical grouping of elements for things like styling and layouts.

<br> is used to create a line break in things like text where you want to force a return to the next line.

So for a grouping of elements like label and input, you would probably want to use just a div.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.