Issue
Normally css files are put inside <head></head>
, what if I put it inside <body></body>
, what difference will it make?
Solution
Just to add on to what jdelStrother has mentioned about w3 specs and ARTstudio about browser rendering.
It is recommended because when you have the CSS declared before <body>
starts, your styles has actually loaded already. So very quickly users see something appear on their screen (e.g. background colors). If not, users see blank screen for some time before the CSS reaches the user.
Also, if you leave the styles somewhere in the <body>
, the browser has to re-render the page (new and old when loading) when the styles declared has been parsed.
Answered By - mauris
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.