HTML head tag

The <head> tag defines the headers of the document.

The element information within the <head> element is provided to the browser as auxiliary information and will not be displayed in the browser window. Only the title information within the <title> tag will appear in the title bar at the top of the browser.

  other sub tags

Head sub tag

The <head> tag is actually composed of a number of sub-tags. Valid sub-tags include:

subtags Description
<meta> Provides meta-information about the page
<link> Defines the relationship of the document to external resources, such as CSS style documents
<style> Defines CSS style information for HTML documents
<title>> Define the title of the XHTML document
<base> Specifies the default address or default destination for all links on the page, not commonly used

In addition to the above sub-tags, <head> tags are not allowed to embed other labels, such as the following usage is wrong:


The embedded paragraph text in this example, although it can be displayed by most browsers, is only a fault-tolerant mechanism for browsers. As a standard HTML language, it should be avoided.

Complete example
   <link rel="icon" href="./favicon.ico" type="image/x-icon" />
   <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
   <meta http-equiv="content-type" content="text/html; charset=utf-8" />
   <meta http-equiv="content-language" content="en" />
   <meta name="robots" content="all" />
   <meta name="keywords" content="html, css, javascript" />
   <meta name="description" content="Developer programming tutorial" />
   <meta name="copyright" content="Copyright (c) 2010 by" />
   <meta name="author" content="" />
   <link href="style/default.css" rel="stylesheet" type="text/css" />
   <title>Developer Tutorial</title>
   	//JavaScript code

Copyright 2014-2017 by All Rights Reserved.