HTML "<div class>" Thingy....
Go to solution
Solved by vorticalbox,
So can someone explain to me what's this actually?
When I was making a website someone told me to put this:
<div class="XXXXXX"><div class="container"> </div></div>After <div class="container"> is the content.
What do <div class="___"> and <div class="container"> do in HTML?
Is this "container" a must or optional? Because after the first <div class="__"> there's always <div class="container">.
I'm a beginner.
<div> is a division on the page or section.
the class allows you to apply styling, if you want some things to be centred you make a centre class in your CSS
.centre{text-align: center;}
this would allow you to style any text to the centre using the class tag
<p class='centre'>text</p><h1 class='centre'>text</h1>
container is just another class.
.container{width: 80%;height: 500px;}
would make the div 80% of the window width and 500 pixels high.

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now