HTML Link Positioning Answer is incorrect
See original GitHub issueSince the HTML5 specification it is no longer recommended to include the optional <head> tag.
https://google.github.io/styleguide/htmlcssguide.html#Optional_Tags
The body tag is also not always required. https://html.spec.whatwg.org/multipage/syntax.html#syntax-tag-omission
Including both of these tags just increase the amount the browser must parse before rendering the page. It also increase the payload size.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Anchor link landing in wrong position - html - Stack Overflow
I think the problem is resulting from the anchors with no contents that you are using. Also, it appears that name= has been...
Read more >Links in HTML documents - W3C
The A element's content defines the position of the anchor. The name attribute names the anchor so that it may be the destination...
Read more >Positioning - Learn web development | MDN
Positioning allows you to take elements out of normal document flow and make them behave differently, for example, by sitting on top of...
Read more >Need help with positioning box link in CSS
I assume it has to do with my positioning commands in the CSS or that I've placed the anchor tag on the wrong...
Read more >URL Canonicalization and the Canonical Tag | Documentation
When a site has duplicate content, Google chooses the canonical URL. Learn more about canonical URLs and how to consolidate duplicate URLs.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Including the
<head>and<body>tag increases the payload size? I can understand the need to optimize for performance and fast loading times, but I should think there are far better ways of solving this. I.eI should think there are more ways than this but removing the
<head>and<body>tag sounds like trouble, considering Browser support may not be there yet for the user who may be visiting your site or application? I think it is best to leave it as is @Millsky 🙂Agree with what @kdgyimah said. The performance gains are likely to not be significant enough to warrant this change. The Hacker News comments outlines more issues with doing this.
But I’ll modify the answer to inform readers about this.