0
What is div tag?
I don't understand "div" tag, actually where I should use and for what? If anyone have time please help. (I'm a Beginner so don't laugh at me)
6 Antworten
+ 2
Div is uses as container for other tags or text. It shows as block (it breaks line and shows separately from other lines). But you can use it to create any (even inline) markup. It is used in modern sites and frameworks like bootstrap as a main construction brick.
+ 2
Br cannot contain any data in it. It used only inside text to insert breakline. On the contrary, the meaning of the div is to be a container for other data. In fact, using of css allow you to change behavior of almost any tags. And so div can act like <i> and so on. And you can even create and use your own tags with own behavior.
+ 2
Sorry if i repeat myself. Phone lost connection
+ 1
Br works inside text. It breaks lines inside text. Div is a container, it is surrounding text or other tags. Additionally it break make next tag goes from new line. The same is tag <p> and some other. In fact you can change default functionality of almost all tags with css. And div for example, will not break lines. Try css display:inline;
0
there is a break line tag also so what is the difference between div and (br/)?
0
Thank you👍👍👍