load external css file in body tag

HtmlCss

Html Problem Overview


> Possible Duplicate:
> What's the difference if I put css file inside <head> or <body>?

usually, external css file loading code is put on header of html.

<head>

...
<link href="/uploadify/uploadify.css" type="text/css" rel="stylesheet" />
...

</head>

but, sometime I should put my css loading code in body tag, I mean..

<body>
...
<link href="/uploadify/uploadify.css" type="text/css" rel="stylesheet" />
...
</body>

so my question is, is it okay to put my css loading code in body tag?

Html Solutions


Solution 1 - Html

No, it is not okay to put a link element in the body tag. See the specification (links to the HTML4.01 specs, but I believe it is true for all versions of HTML):

> “This element defines a link. Unlike A, it may only appear in the HEAD section of a document, although it may appear any number of times.”

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJinbom HeoView Question on Stackoverflow
Solution 1 - HtmlDaanView Answer on Stackoverflow