Welcome Guest! (App Version 3.1)

websitnero logo name

Head Section in HTML


  • There are 2 sections directly in an <html> tag -- head & body.
  • Head section contains all metadata about the page, while body section contains data to be shown to end user.
  • Head section contains reference to -- favicon, scripts, css files, fonts, etc.

Use of Head Section

The outermost tags in HTML language are <HTML> tags. This outermost tag contains two more tags directly inside it, which are <head> tag and <body> tag.

Head tag contains the relevant information about the web page without affecting the UI of the web page. This means that whatever code is written inside the head tag is not visible to the user and this code does not play any direct role (apart from internal styling) to the visual design or UX of the web page.

<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="keywords" content="html tutorial">
<meta name="description" content="free online html tutorial">
<link rel="icon" href="someImage.png">

Body tag on the other hand contains the data that is visible to the end user on his computer screen. This data can be in simple text format or may contain images, audios, videos, charts or data in any other format that can be rendered on a web page.

Note: Head tags can be said to contain that relevant information about a web page which does not directly affect the end-user visual experience. This information is rather informative and used for resource gathering, enhancing SEO of web page, and adding title or favicon to it.

The main content of head section are as follows:

  • External CSS reference
  • Style tags for CSS Internal Styling
  • Script tags to reference external JavaScript files
  • Meta tags for SEO purpose, including keyword and description attributes
  • Title of the web page
  • Favicon of the web page
WebsiteNero is highly optimized for learning various website developing technlogies. We try our best to add maximum modules and examples to help learn the concepts clearly and vividly. We try to present all content and examples as simple as we can removing any complexity to hurdle easy understanding. We try best provide you with worthful content, but we cannot guarantee full correctness of all the content on this site. While using this website, you agree to have read and accepted all our terms of use and conditions, cookie, and privacy policy. Copyright, 2013-2018 by websitenero.com. All Rights Reserved.