Jitendra Vyas Jitendra Vyas - 3 months ago 6
CSS Question

Do we need type="text/css" for <link> in HTML5


Possible Duplicate:

Is type=“text/css” necessary in a <link> tag?




Do we need
type="text/css"
for
<link>
tag in HTML5?

Answer

The HTML5 spec says that the type attribute is purely advisory and explains in detail how browsers should act if it's omitted (too much to quote here). It doesn't explicitly say that an omitted type attribute is either valid or invalid, but you can safely omit it knowing that browsers will still react as you expect.

Comments