+ 1
<div class="section">, here what is (class="section")
4 Answers
+ 2
It will be more clear to you and got its importance when you start css.
to target an element for design in css we use class name value
Ex
For your div to be red
.section{
background:red;
}
+ 11
//Use the search bar before asking the question.
https://www.sololearn.com/post/10362/?ref=app
https://www.sololearn.com/discuss/1520807/?ref=app
https://www.sololearn.com/discuss/1917071/?ref=app
https://www.sololearn.com/discuss/1872597/?ref=app
https://www.sololearn.com/discuss/1235961/?ref=app
https://www.sololearn.com/discuss/2115116/?ref=app
https://www.sololearn.com/discuss/1080349/?ref=app
+ 4
class is attribute name.
section is attribute value.
class="name" is attribute.
Happy coding
+ 2
class is a selector selects elements with specific class attribute.
It is mostly used for giving css to tags.
<div class="section">
Declaration of class like :
use "." before class ,
.section{
//put here attribute and its value as you desire.
}
I hope this will help you.
Thanks!