A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.fullstackpython.com/cascading-style-sheets.html below:

Cascading Style Sheets (CSS) - Full Stack Python

Cascading Style Sheet (CSS) files contain rules for how to display and lay out the HTML content when it is rendered by a web browser.

Why is CSS necessary?

CSS separates the content contained in HTML files from how the content should be displayed. It is important to separate the content from the rules for how it should be rendered primarily because it is easier to reuse those rules across many pages. CSS files are also much easier to maintain on large projects than styles embedded within the HTML files.

How is CSS retrieved from a web server?

The HTML file sent by the web server contains a reference to the CSS file(s) needed to render the content. The web browser requests the CSS file after the HTML file as shown below in a screenshot captured of the Chrome Web Developer Tools network traffic.

That request for the fsp.css file is made because the HTML file for Full Stack Python contains a reference to theme/css/fsp.css which is shown in the view source screenshot below.

CSS preprocessors

A CSS preprocessor compiles a processed language into plain CSS code. CSS preprocessing languages add syntax such as variables, mixins and functions to reduce code duplication. The additional syntax also makes it possible for designers to use these basic programming constructs to write maintainable front end code.

CSS preprocessor resources CSS libraries and frameworks

CSS frameworks provide structure and a boilerplate base for building a web application's design.

CSS resources CSS learning checklist
  1. Create a simple HTML file with basic elements in it. Use the python -m SimpleHTTPServer command to serve it up. Create a <style></style> element within the <head> section in the HTML markup. Play with CSS within that style element to change the look and feel of the page.

  2. Check out front end frameworks such as Bootstrap and Foundation and integrate one of those into the HTML page.

  3. Work through the framework's grid system, styling options and customization so you get comfortable with how to use the framework.

  4. Apply the framework to your web application and tweak the design until you have something that looks much better than generic HTML.

Once your app is styled what do you need to learn next?

How do I improve an app's user interface?

How should I host and serve static content files?

How do I use JavaScript with my Python web application?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4