Now Available: The GTmetrix MCP

Get GTmetrix performance testing data and analysis integrated right into your AI tool.

Available to all users - Use code MCP25 for 25% off a GTmetrix PRO plan! Learn More

TRY IT NOW

PageSpeed: Put CSS in the document head

Recommendations

Lighthouse
Metrics
Audits
PageSpeed (Legacy)
YSlow (Legacy)

Overview

Moving inline style blocks and elements from the document body to the document head improves rendering performance.

How does your site score on this recommendation?

Details from Google

Specifying external stylesheets and inline style blocks in the body of an HTML document can negatively affect the browser's rendering performance. Browsers block rendering a web page until all external stylesheets have been downloaded. Inline style blocks (specified with the