DEV Community

andrea-techprep
andrea-techprep

Posted on

Today I learned!

Hello everyone!

Unfortunately, I'm retyping this because my draft did not save. But I am taking this as an opportunity to review again! :)

Anyways.... as I had previously written. I was getting confused with all of the new terms I was learning. So, I thought I would create a little cheat sheet that I can reference.

  • The extension for CSS files is .css. These can be linked to an HTML file using a tag in the

    section.
  • CSS code can be written in an HTML file by enclosing the code in tags. <br> TERMS</p></li> <li><p>CSS classes: can be reusable and applied to many elements. Class selectors = . followed by the class name.</p></li> <li><p>CSS ID selectors: unique and used to style only a single element. ID selectors = # followed by the id name.</p></li> <li><p>CSS type selectors: match all elements of a given type or tag name. Unlike for HTML syntax, we dont include the angle brackets when using type selectors for tag names. </p></li> <li><p>The CSS class selector matches elements based on the contents of their class attribute. a.</p></li> <li><p>Selector specificity: the selector with the highest specificity wins out. The most specific selector type is the ID selector, then class selectors, and then type selectors.</p></li> <li><p>CSS ID selector: matches elements based on the contents of their id attribute. The values of id attribute should be unique in the entire DOM. # </p></li> </ul> <p>These are the ones I was confusing but typing them out and rereading definitely helped me review. </p> <p>Excited to continue learning!!!</p>

Top comments (2)

Collapse
 
mannu profile image
Mannu

Ahh good work, Keep Learning
btw next time try using markdown so that people can like reading it

Collapse
 
gnixon1 profile image
Gary Nixon

Great to hear. Keep on pushing and moving forward. You got this!