classes are assigned like this <elementname class="classname"> and you have to also define it in css file like this .classname {property: value}. sometimes insructions ask you to assign a class to element only in one lesson and to define it in css file in next lesson
<h1`><p`> <`div c`lass="`Flavor"> French Vanilla <`/p><`/h1>
and yet I still have to assign the flavor class to the p element,
the lesson suggests I don’t edit the css. file yet, I don’t know the name of the ‘text-`align’ yet, and here is the solution without all that.
one is type selector which is like this for example for p <p> {text-align} it will target all paragraph elements to center its text. and other is class selector which is like this for example for flavor .flavor {text-align: center}, now this class when assigned to any element for example for p <p class="flavor" then text will be assigned for only those paragraph elements which are assigned flavor class. Hope you understand my point
Thanks, I will just go through this from scratch tomorrow and hopefully it will start to make more sense,
I think I have a different understanding of the phrase ‘selector’, I think I may be confusing it with the text in the " " - since <div> is just an element that creates a box/division and {`} seems to be the parameters of the selector(?maybe)
a selector is a css term for targeting a particular element if you are targeting element itself then its type selector and if you are targeting element(s) which are assigned a class then you will target the class not elements its called a class selector or id selector if the element has id instead of a class