The order of elements in head is not just an SEO concern: the placement of the character encoding declaration affects text parsing, the order of styles can change which rules override others, and the placement of resources and scripts can affect downloading and rendering. However, the available information does not support a fixed order that works for every page. First identify which elements are in use, then distinguish functional requirements from performance considerations, rather than treating historical examples as current best practices.
Declare the encoding early; title does not have to come first
For pages using HTML5 syntax that do not declare their encoding in application code or at the server level, one respondent recommends placing charset at the start of head. This is because non-ASCII characters, such as those in a Chinese title, may follow. Declaring the encoding first also helps parsers detect it.
Another answer notes that the encoding declaration must appear early in the document, but gives no verifiable cutoff. An exact numerical limit therefore cannot be determined from that answer. By contrast, that respondent considers the position of title within head unimportant. In its 2016 release notes for version 7.0, Screaming Frog said its tool could find title anywhere in the HTML, but still advised against placing it outside head. A tool’s ability to find an element does not mean it should be placed there.
Historical meta examples do not follow a consistent order
These two sets of historical recommendations use different orders:
- One lists charset, X-UA-Compatible, title, description, and viewport, in that order.
- The other, written in the context of HTML5 and Bootstrap 3.3.4, starts with charset, followed by X-UA-Compatible, viewport, title, and then CSS.
The latter recommends including viewport for pages designed to work across devices, but the respondent also acknowledges that some of the claimed performance effects of the ordering are speculative. These examples help explain the arrangements used at the time. They do not establish that every page today needs X-UA-Compatible, or that switching the order of description and viewport will improve rankings.
Order styles to achieve the intended overrides
When a page uses both external stylesheets and styles written within the page, one respondent recommends placing the page-level styles after the external stylesheets so they can override them. However, later declarations have this advantage only when other cascade conditions and selector specificity are equal. For example, if both set the text color of paragraphs, putting the page-specific setting later helps it make the intended local adjustment. This does not mean that later styles necessarily override every other rule.
The same respondent advises against using @import in page-level styles because it interferes with parallel downloading of other stylesheet resources. This advice concerns the arrangement of existing styles; it is not a requirement to add a style element to every page.
Script and icon placement affects when they load
For the directly loaded scripts in the examples, one respondent recommends delaying loading as far as reasonably possible because these scripts may block or delay rendering. If they must be in head, place them near its end. If they can load later, consider placing them at the end of body. This advice should not be treated as a rule that all scripts must follow.
For icons, the consideration is the opposite: placing them before most meta elements may allow their downloads to start slightly earlier. However, the original text presents this only as a minor adjustment open to discussion and provides no measurements, so a noticeable speed improvement should not be promised.
The placement and order of elements in head: perspectives from across the web
Does the order of meta tags directly affect SEO?
One respondent argues that, in most cases, there is no need to be overly concerned about meta tag order for SEO because search engine crawlers read the entire page. However, this is the respondent’s assessment, not an established current rule for search engines, and it does not imply that other ordering considerations are unimportant.
Is putting all CSS in head always best for performance?
Not necessarily. A 2020 comment argued that, for Core Web Vitals, putting all CSS in head was no longer best practice at the time. However, the available information provides neither test results nor specific alternatives, so it does not establish how a particular page should be changed. This historical comment should not be treated as a current general rule.
References
- Screaming Frog SEO Spider Update – Version 7.0www.screamingfrog.co.uk · 2016-12-12T10:38:50+00:00 — Source used in the article above.
- Order of HTML meta tagswebmasters.stackexchange.com — Source used in the article above.
- Order of HTML meta tagswebmasters.stackexchange.com — Source used in the article above.
- Order of HTML meta tagswebmasters.stackexchange.com — Discusses: Does the order of meta tags directly affect SEO?
- Order of HTML meta tagswebmasters.stackexchange.com — Discusses: Is putting all CSS in head always best for performance?
- For SEO, does it matter where the title tag is positioned within the head tag?webmasters.stackexchange.com — Source used in the article above.




