Study

Recitation (Basic CSS selector)

  •   0%
  •  0     0     0

  • How do you select all elements with the class name "highlight"?
    .highlight { }
  • Create a code base on this output. A h1 that is centered and has blue text color.
    h1 { text-align: center; color: blue; }
  • Identify whether the CSS in each example is INLINE, INTERNAL, or EXTERNAL.. <p style="color: blue; font-size: 18px;">This is a paragraph.</p>
    Inline
  • Debug the incorrect CSS Syntax: h1 h2 p color: green; { }
    h1, h2, p { color: green; }
  • True or False. The selector h1, h2, h3 { } applies the same style to all three headings.
    True
  • Create a code base on this output: A paragraph with a yellow background and 16px font size.
    p { background-color:yellow; font-size:16px }
  • The universal selector in CSS is written as:
    *
  • Identify whether the CSS in each example is INLINE, INTERNAL, or EXTERNAL. <link rel="stylesheet" href="style.css">
    External
  • What CSS selector is used to select an element by its id?
    #
  • Debug the incorrect CSS Syntax. #title { font-size= 20px; }
    #title { font-size: 20px; }
  • Set the text color to red for the paragraph with the id 'para1'.
    #para1 { text-color: red; }
  • Create a code that will select all elements with the class name 'button' and has a red text color.
    .button{ color:red; }