topskill.dev
CoursesTracks
0
All courses/CSSType Rhythm
Visual Style
5 / 9
← 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

Type Rhythm

Make the market note easier to read

The bread-stall note uses familiar HTML. This time the changes are in the letters and lines rather than their background.

font-family: Georgia, serif on body asks for Georgia first, then a generic serif font if Georgia is unavailable. A serif font has small finishing strokes on its letters. The note inherits this family; the small label has its own supplied Arial rule.

The .story selector targets the longer paragraph. Its unitless line-height: 1.7 makes each line 1.7 times the text's font size. It changes the line boxes, not the letter size. On h1, letter-spacing: 0.04em adds space between characters. An em here is relative to the heading's own font size.

Compare the spacing

Run. Change .story's line height to 1.2, Run again, and compare the distance between lines. Restore 1.7. Change the heading's letter spacing to 0, compare, then restore 0.04em. The supplied card layout stays the same. For ordinary reading text, start with comfortable text size and a unitless line height rather than a fixed card height. A roughly 45–75-character line is a useful starting range, not a rule for every label. Check actual paragraphs at narrow widths and with enlarged text; a heading treatment does not automatically suit body text.

The exercise uses .note p, a selector with a space meaning “paragraphs anywhere inside .note.” It applies line height to both the label and the longer paragraph.

Hint 1
1 / 1
HINT 1

Typography rules can target the page body, a heading, or paragraphs separately.

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