Mobile app version of vmapp.org
Login or Join
Jessie594

: Maximum size of inline css or when to use link tags with src to a css file I read Googles Optimize CSS Delivery article but I still don't know how much I can put in an inline style block.

@Jessie594

Posted in: #Css #Html

I read Googles Optimize CSS Delivery article but I still don't know how much I can put in an inline style block. Google recommends using inline css when the content is small and for big files they suggest linking to a css file.

When I have css with about 250 lines, is it appropriate for inline css or should I link to it?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Jessie594

1 Comments

Sorted by latest first Latest Oldest Best

 

@Sarah324

There is no definitive size where it becomes necessary or ideal to use an external stylesheet. Size is one factor but there are others which come into play. For example, an external stylesheet can be cached by the browser. So if your visitors will be making multiple page requests that use the same stylesheet, the browser can cache that stylesheet which will give the user faster page loads and a better experience. It also saves your server load and bandwidth.

Conversely, if this is a one page website then having the browser have to make multiple requests for assets can slow down the page load and harm the user experience (although it would be minimal).

So this decision depends on what you're doing and how you're doing it.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme