-
Book Overview & Buying
-
Table Of Contents
Flask By Example
By :
Our site remains pretty bare. There's a lot of white and some black. Most users prefer color, animations, borders, margins, and so on. As mentioned before, we're not really going to focus on aesthetics now, but we'll add some basic colors and styles.
There are a few ways that CSS can be added to a web page. The best way is to keep it completely separate from the HTML and save it in an external file, which is included in the HTML in a <link> element. This is sometimes referred to as the external CSS. The worst way is called inline CSS. Using the inline method, CSS is defined on a per element basis; this is considered bad practice as any changes to style require trawling through HTML to find the relevant sections.
Furthermore, many elements on a page often have the same or at least related styles to maintain color schemes and styles throughout the site. Using inline styles, therefore, often leads...
Change the font size
Change margin width
Change background colour