user2280513
user2280513

Reputation: 81

Does it matter where the head tags are in HTML code?

I'm looking at using Twitter cards for my business. Some of the cards need a bit of code implemented into the website. This code (meta-data) goes into the <head> tags. Problem is we have a content management system and I believe this implementation may require us to go to our developers.

Does it matter where the head tags go? For instance can it go in the middle of the body tags? I've only ever known it to go up near the top but I'm not 100% on my HTML so I am unsure.

Upvotes: 2

Views: 142

Answers (1)

Robert Harvey
Robert Harvey

Reputation: 180898

From http://www.w3.org/TR/html5/document-metadata.html#the-head-element

Contexts in which this element can be used: As the first element in an html element.

If you use it anywhere else other than its recommended position, there's no guarantee that you won't get unexpected behavior.

Upvotes: 1

Related Questions