E
E
Enniack2015-09-23 16:04:46
css
Enniack, 2015-09-23 16:04:46

What if all styles are in html?

I helped on freelancing on the little things, a person bought and installed a ready-made template, I look - all styles are written in html through style. As a result, in a one-page landing, html weighs 52kb. Also through id. All through id.
I myself do not fully understand it yet, but, in my opinion, does this greatly affect the download speed?
What to tell the client, compress html (after compression 52kb -> 9kb) or rewrite all styles in css?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
K
Kotik Anton, 2015-09-23
@27cm

I myself do not fully understand it yet, but, in my opinion, does this greatly affect the download speed?

It seems to be for the better. Still one request to the server less.
stackoverflow.com/questions/8284365/external-css-v...
Compress html anyway.

A
Alexey Ukolov, 2015-09-23
@alexey-m-ukolov

On the contrary, inlined styles will speed up loading due to the absence of an additional style file request.
But supporting them is hell, of course.

G
Gregory, 2015-09-23
@grigruss

Take out styles and use classes in those places where it is requested. The speed does not depend on where the styles are written, it's just more convenient if they are in an external file. By using classes instead of id, you can optimize the code for JS and CSS, which will increase the speed.
In any case, edit the handles.

Z
zooks, 2015-09-23
@zooks

To take out inlined styles in tag attributes (what kind of "eccentric" did this?) In a CSS file, I recommend using Dreamweaver, there is such a function.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question