Putting stylesheets in the
HEAD
of your document not only improves page load times,
it also avoids the browser having to repaint the page when later stylesheets are downloaded.
This is called the Flash of Unstyled Content (FOUC).
In this example the stylesheet is included at the bottom of the document, but its css rules are used in the main part of the document. The text is rendered and then after the stylesheet is downloaded the entire page must be repainted to reflect the new styles. In IE this only occurs when:
- the URL is typed into the browser
- the URL is requested as a link - click here
Always put your stylesheets in the document HEAD
using the LINK
tag.