A banner, footer, and HTML boilerplate often appear on every page. Copying them into each template makes changes harder to maintain. Template inheritance follows the “don’t repeat yourself” principle: keep shared structure in a parent template and put page-specific content in child templates. section 6.4.4
A shared layout and a home page
A base.html template defines the page structure and named blocks such as head, styles, content, and footer. The home page starts with `{% extends "base.html" %}` and fills the content block with the current time, visit count, and available banner colors. Jinja2 renders the result as a complete HTML page. section 6.4.4
Keep presentation and interactivity files in Flask’s static directory, alongside the templates directory; CSS and JS subdirectories help organize them. Inheritance handles shared HTML structure, while those files supply styling and behavior. section 6.4.4


