Linking External Css files to html

Quick Question; Can i link a css file to html outside the head tag? I’ve seen so many videos that said so, Is it compulsory to add the css href link to the head tag or can i add it else where?

Its possible to put it in another place, but it would be considered not the best practice to do so

There a number of reason to keep it in the head. It doesnt make sense to have it anywhere else.

“The HTML specification suggests placing metadata (such as external links to stylesheets) in the <head> element. Sticking to the specification ensures better consistency across web browsers.”

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.