Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

html5

What is the <head> element in HTML?

Abdul Monum

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Answers Code

The <head> element in HTML is a container for the metadata of the HTML document. contains information about the title of the page, the author’s name, links to CSS or custom favicons, reference to other sources, any scripts to make webpage interactive, or any key information describing the document. This data is not displayed on the webpage. The following HTML elements can be used inside the <head> element:

  • <title>
  • <style>
  • <base>
  • <link>
  • <meta>
  • <script>
  • <noscript>

The <title> element must be present underneath the <head> element in order for the webpage to be complete.

Example

Explanation

The HTML document above displays a simple webpage containing a heading and a body. In lines 3-10, you can see the <head> element and the elements inside it describing the metadata of the document.

  • <title> describes the title of the webpage.
  • <meta> specifies the character set encoding for the HTML document.
  • <style> instructs the styling throughout the webpage.
  • <head> acts as a container that wraps the metadata to better structure the HTML document.

RELATED TAGS

html5

CONTRIBUTOR

Abdul Monum
Copyright ©2022 Educative, Inc. All rights reserved

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Answers Code
Keep Exploring