ID is used to uniquely identify an element(a unique identifier). It is particularly useful when you want only 1 element to have specific styling. Another use is in JavaScript. JS uses getElementbyID to call upon an element to perform specific tasks. Class is used to define styling for HTML elements. It can be used multiple times, meaning that multiple elements can use the same class to style.
Bro Code
Box 1
Box 2
/* style.css */
body{
margin: 0px;
}
.box{
border: 5px solid;
font-size: 5em;
width: 250px;
height: 250px;
margin-top: 50px;
margin-right: 50px;
margin-bottom: 50px;
margin-left: 50px;
}
#box1{
background-color: hsl(0, 100%, 60%);
}
#box2{
background-color: hsl(189, 100%, 55%);
}
bro is a legend
M9wed had sat, kayshr7 khir men les profs
@@samisado6331 check point l m4arba li 4aydozo hna
Bro visited his friend
@@ElysiumGresit lol
@@imrane206 margin w padding w font-size w lakhra nsitha ba9i mafhmtch logique fihom
Wow you help me alot understanding stuff about html and css. Thanks alot!
I like the way you have expalined I am starting to learn it, thanks for your short and clear explanation.
Really helpful for understanding margin concept
it's clear and easy to understand the usage.
Thank You So Much!!!! This Is So UseFull For Us!!!!
video của bạn rất hay
Thank you soo much
Love you Bro I missed you too much😭🤧
Genius of the Century
THIS IS GOOD
thanks bro, it helped me
Can you please explain the margin: inherent
Was that a Shrek reference? 😉
Why do you use class and id within the same div again?
Couldn't have said enough thank you
Hello I just want to ask. what is the difference of class and id? thank youu
I think we use id to track / find element with java script like (get element by id)
There isn't really a difference
I think class can be used for multiple stuff at the same time but ID not? Im not sure
ID is used to uniquely identify an element(a unique identifier). It is particularly useful when you want only 1 element to have specific styling.
Another use is in JavaScript. JS uses getElementbyID to call upon an element to perform specific tasks.
Class is used to define styling for HTML elements. It can be used multiple times, meaning that multiple elements can use the same class to style.
@@TheRetiredBatman Your're right.