What is a container? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

What is a container?

Usually in somewhere in the beginning of the body, I see a <div class="container"> tag. What exactly does "container do or mean?

14th Apr 2019, 6:57 PM
Ginfio
Ginfio - avatar
6 Answers
+ 7
Container is just an name , and it is used because , when you code , you think at the container as something that holds the whole code(or just an part , depending on what it is used for.) "Container" is an class name, and it can be replaced with any other name.
14th Apr 2019, 7:18 PM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
+ 5
Divs are good Containers <div></div>
14th Apr 2019, 7:39 PM
I‘m Sarah🌹
I‘m Sarah🌹 - avatar
+ 4
An element that holds other elements and text.
14th Apr 2019, 7:00 PM
Sarthak Pokhrel
Sarthak Pokhrel - avatar
+ 3
It can also be said class name.
14th Apr 2019, 7:00 PM
Sarthak Pokhrel
Sarthak Pokhrel - avatar
+ 3
🌲 Alex Tusinean 🔥 If using bootstrap, container class cant be replaced by other.
15th Apr 2019, 1:32 AM
Sarthak Pokhrel
Sarthak Pokhrel - avatar