β Must-know
<style> element in the same documentFurther detail
π An inline style overrides external and internal styles.
HTML supplies content; CSS supplies its style.
CSS selector: Identifies the element or elements to which a CSS rule applies.
The selector forms shown are:
*h1#myId.myClassThe color property sets foreground color, whereas background-color sets background color.
1. What is the primary role of CSS in a web document?
2. A developer wants to place CSS rules in the same HTML document but separate from the elements they style. Where should the rules go?
3. Which selector targets elements with the class name `myClass`?
What does CSS describe in a document?
The documentβs style.
What three ways can CSS be included in an HTML document?
Inline on an element, in a `<style>` element, or in an external stylesheet.
Which symbol represents the universal CSS selector?
*
Which CSS selector form targets an element type such as `h1`?
An element selector.
Which CSS selector form uses an identifier such as `#myId`?
An ID selector.
Which CSS selector form uses a class such as `.myClass`?
A class selector.
It covers the core concepts of CSS Styling and Layout, organized by topic with the key definitions, explanations and takeaways, so it's easier to learn and remember.
Read the full study guide βThe practice quiz has 23 multiple-choice questions, each with an explanation. Use it to check what you know and find your gaps.
Take the quiz (23 questions) βThere are 57 flashcards on CSS Styling and Layout, with a question on the front and the answer on the back. Try to recall each answer before you flip, and let spaced repetition bring back the ones you miss.
See all 57 flashcards βUpload a PDF or paste your notes. Revizly writes a study guide, a practice quiz and flashcards in about a minute.