Head
The <head> element is a container for all the elements of a web page header. Elements inside <head> can include scripts, instruct the browser where to find style sheets, provide meta information, and more.
The following tags can be added to the head section: <title>, <style>, <meta>, <link>, <script>, <noscript>, and <base>.
Tag | Description |
---|---|
<head> | Defines information about Html documents. |
<title> | Defines document title which displayed at the top of any browser window or browser tabs. |
<base> | Defines a default address or a default target for all links on a page. |
<link> | Defines a link or relationship between a document and an external resource. |
<meta> | Defines metadata about an HTML document. |
<script> | Defines client side script (javascript, jquery). |
<style> | Defines style sheet (css) information for a document |
The <title> tag specifies the title of the web page.
The <base> tag specifies the base URL and target for all relative URLs in a web page.
The <link> tag defines the relationship between a document and an external resource, most used to link to style sheet.
The <meta> tag specify metadata, information about a document rather than document content in a variety of ways. The META element can be used to include name/value pairs describing properties of the Html document, such as author, Expiry Date, a list of keywords, description etc.
Metadata provided by using meta tag is a very important part of the web. It can assist search engines in finding the best match when a user performs a search. Search engines will often look at any metadata attached to a page especially keywords and rank it higher than another page with less relevant metadata, or with no metadata at all.
A script is a small piece of program that can add interactivity to your website. The <script> tag used to defines client side script, such as JavaScript or jQuery. It also include a single external script file in the Html page
The <style> tag used to defines cascading style inside the html page to specify browsers how to render Html elements.