liveBook · Manning

Stylesheet

As explained in A Pythonic Adventure: From Python basics to a working web app

A style sheet is a plain-text resource containing rules that describe the visual presentation of document elements.

A stylesheet is a plain-text file containing rules that describe how HTML elements look. Separating styles from HTML lets one change update every matching element in one place. section 13.0

A stylesheet can specify:

  • Colors, font sizes, backgrounds, and fonts for elements such as h1 and h2 headers. section 13.0
  • Several combined stylesheets, allowing existing styles to be reused and selectively changed. section 13.0

Coffee shop styling

A coffee shop stylesheet assigns Playfair Display to headings, gives the page a beige background, and changes text-input and menu colors.

How A Pythonic Adventure: From Python basics to a working web app covers it

How deep it goes
Defines stylesheet purpose, reuse, and simple rules but stops short of deeper CSS mechanics.
Examples
Demonstrates heading fonts, page backgrounds, menu colors, combined stylesheets, and linked CSS files.
What you can do after
Build it from scratch by writing CSS rules and linking a project stylesheet to HTML templates.
How it connects
Connects CSS with HTML elements, web design, fonts, and reusable functions.

Also explained in

Compare how 2 books explain stylesheet →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of A Pythonic Adventure: From Python basics to a working web app. The section links point to the parts of the book it draws on.