100devs

9 flashcards · Programming Languages · by Michael Joel

  1. Golden Rule- Separation of Concerns

    HTML - Content / Structure CSS - Style Javascript - Behavior / Interaction Don't want to mix any of these up at all to help with organization and making future changes.

  2. Exception for Writing Inline Style

    Email ... might be the only option to style

  3. Exception for Writing CSS in HTML's head

    Amazon does this to save a very small amount of time on loading. This saves them millions of dollars. Don't do this unless you work for Amazon. :P

  4. Explain with correct terminology: p { color: red; font-weight: bold; }

    The whole thing is a rule. { ... } is the declaration block each line within is a declaration color / font-weight = properties red / bold = values : = colon ; = semicolon. lol...

  5. What does CSS stand for? What does the C specifically mean?

    CSS = Cascading Style Sheet CSS is used for styling HTML Cascade means that "What comes below, can override what came above." This is how rules are applied in CSS, tied in with specificity weight/value/points

  6. CSS Colors - what types of values can be used?

    color: red; color: #FF0000; color: rgba (255, 0 , 0 ,1 ) color keyword (red) hexadecimal rgb or rgba values (Leon's favorite. goes well with digital color meter; and nice to have the alpha channel)

  7. Fonts - how to set in CSS and backup to other fonts?

    CSS declaration would look like: font-family: 'Source Sans Pro', 'Helvetica', sans-serif; need to link to external sources in the HTML: find the necessary link in fonts.google.com

  8. Specificity

    Determines which rules apply. the more specific you are, the more points it gets. id = 100 class = 10 element = 1 !important = 1000 (AVOID)

  9. IDs

    IDs are used for selecting distinct elements. only one id with the same value per document. HTML: <p>Hey youtube</p> (TAGS - see edit mode) CSS: #zebra { color:green; }