Why does the browser need metadata about the page?


#1

Question

Why does the browser need metadata about the page?

Answer

There exists different categorizations of metadata but most generally metadata is “data about data”. While the browser doesn’t need most metadata it does often use metadata to enhance the user experience in some way. Metadata not displayed on a page but behind the scenes it can be used by other software (web crawlers, search engines, browsers, etc.) to process, encode, extract or index all sorts of interesting information (geographic coordinates, calendar events, contact info, etc.). What’s more, businesses are often interested in using metadata to improve SEO or Search Engine Optimization.


FAQ: Learn HTML Elements - Common HTML Elements - The Head
#2

Does it make a difference whether metadata come before or after it?


#3

HTML is read by the browser from the top of the document to bottom of the document. Important data (language, characters, frameworks, etc.) is stored in the section and should be as close to the top of the document as possible so the browser knows how the page should be displayed.