开发者

load external css file in body tag [duplicate]

This question already has answers here: Closed 12 years ago. 开发者_Python百科

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?


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.”

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜