Head & Body (<head>, <body>)

When To Use

  • The <head> contains machine-readable information or metadata about the document, like title, scripts and style sheets. 1
  • The <body> element contains all the content. Including <header>, <main>, <footer>, ... 2

Rules

  • The <head> should be the first element inside the html element. 1
  • A document can only contain a single <body> element. 2

Sources 

  1. MDN: <head>: The Document Metadata (Header) element by Mozilla contributors is licensed under CC-BY-SA 2.5
  2. MDN: <body>: The Document Body element by Mozilla contributors is licensed under CC-BY-SA 2.5
Created at: 10.03.2023, Last updated at: 11.06.2023