topskill.dev
CoursesTracks
0
All courses/CSSApply CSS Three Ways
CSS Foundations
6 / 10
← CSS
○CSS Rule Style an Exhibit Card○Write Your First CSS Rule○CSS Selectors Target Exhibit Details○Target Exhibit Details○Apply CSS Three Sources●Apply CSS Three Ways○Specificity Resolve a Style Conflict○Resolve Specificity○Inheritance and the cascade✦Module Quiz
○Color Palette○Color Palette○Background Layer○Background Layer○Type Rhythm○Type Rhythm○Borders and Shadows○Borders and Shadows✦Module Quiz
○Box Model Seed Packet Card○Space a Seed Packet○Display Swap Table Labels○Arrange Swap Table Labels○Positioning Pickup Pin○Pin the Pickup Location○Sizing and Overflow○Size a Seed-Swap Notice○Sticky scroll headings✦Module Quiz
○Advanced Selectors Book Cart Sign○Target a Book Cart Sign○Pseudo-Classes Night Cart States○Style Night Cart States○Pseudo-Elements○Add a Book-Quote Mark✦Module Quiz
○Lantern Market navigation○Lantern Market navigation✦Module Quiz
○Community garden request card○Community garden request card✦Module Quiz
○Flex Direction○Flex Direction○Main-Axis Spacing○Main-Axis Spacing○Cross-Axis Alignment○Cross-Axis Alignment○Wrapping and Flex Items○Wrapping and Flex Items○Flexbox Navigation○Flexbox Navigation✦Module Quiz
○Grid Tracks○Grid Tracks○Grid Gaps○Grid Gaps○Grid Placement○Grid Placement○Responsive Grid○Responsive Grid✦Module Quiz
○River radio schedule○Harbor radio schedule✦Module Quiz
○Field note color system○Field note color system○Transforms○Rotate a Field Note○Resilient styles✦Module Quiz
○Kite festival signal○Garden festival signal✦Module Quiz
○Garden forecast○Harbor forecast○Fluid sizing○Fluid weather bulletin○Images that fit✦Module Quiz
○Seed inventory table○Tool checkout table✦Module Quiz
○Community maker profile○Maker profile sheet✦Module Quiz

Apply CSS Three Ways

Style the gallery notice three ways

The previous demo put declarations in an attribute, a <style> block, and a separate file. This gallery notice supplies an empty internal block and style.css, but no stylesheet link. Edit both tabs.

For inline CSS, put declarations directly in the heading's style attribute. For internal CSS, put a complete selector-and-braces rule inside the supplied <style> block in <head>. External rules belong in style.css.

Your Task

  1. Set color: #7a1fa2; in an inline style attribute on the <h1>.
  2. Set font-size: 18px; in an internal p rule.
  3. Add <link rel="stylesheet" href="style.css"> inside <head>.
  4. Set background-color: #eef6ff; in a body rule in style.css.

Check each source

Run to inspect the purple heading, larger paragraph, and pale blue background. Submit after each step to check its location as well as its result. The preview injects the stylesheet tab automatically, so the link task will not cause a visible change here; it supplies the connection your HTML needs outside this preview.

Hint 1
1 / 1
HINT 1

Use <link rel="stylesheet" href="style.css"> for external CSS.

Files
  • ⋄index.html
  • ⋄style.css
Loading editor…