news.volyx.in

HEAD – A guide to <head> elements (htmlhead.dev)

497 points by mooreds · 2574 days ago · 124 comments on HN

Article summary

The article provides a comprehensive guide to HTML head elements, including meta tags, link tags, scripts, and icons. It covers the essential elements for any web document, such as character encoding and viewport settings, and explains their purpose and usage. The article also discusses the recommended order of elements in the head section for best performance and correct document rendering. Additionally, it touches on various other topics, including Open Graph protocol, Schema.org, and web monetization.

Main themes

  • HTML head elements
  • meta tags
  • responsive web design
  • mobile development
  • web standards
  • browser compatibility

What commenters say

  • The use of certain meta tags, such as the viewport tag, is necessary for proper mobile rendering, but some argue that mobile browsers should automatically handle this without the need for explicit tagging. Some commenters believe that the use of the viewport tag is not necessary for modern mobile browsers, which can render websites correctly without it. The use of the maximum-scale attribute in the viewport tag can be problematic for accessibility and usability. The HTML5 specification has dropped version numbering and is now simply referred to as HTML. Some developers use User-Agent sniffing to serve different content to mobile devices, while others argue that this approach is outdated and inefficient. The use of a null favicon can prevent unnecessary HTTP requests and improve page load times. The importance of proper metadata and semantic markup for search engine optimization and accessibility is highlighted in the discussion.