The <head> element is a container for all other header elements and is placed between the html tag and body tag. The head element is a major of HTML document.
Head Section of html document not visible directly on the web page. The head element is like a container for metadata. The Html head tag contains metadata and metadata is data about the html document. Metadata typically define the document title(require every HTML document), style, location of stylesheet, descriptions, scripts and other meta information.
Many several tags go inside the head section
Title
Style
Script
Link
Meta
Base
Syntax : head tag syntax is
The <title> tag :
HTML <title> tag is used in every HTML Document web-page, it is necessary for Search Engine Optimization. The page title is used by search engine algorithms to decide the order when listing pages in search results.
The <title> element give the information what is the Title of the HTML web-page, it is display in the browser's title bar or in the page's tab.
Important about the title element :
The title must be in text.
The title element is written in the head tag.
The title is provide for the page when is added to favorites in the browser.
Content written between in the title element is shown on the title bar.
Use for Search Engine Optimization (SEO).
If you do not include the <title> tag within the <head> tag, you will receive the error.
The <style> tag : The Style Information Element
The style tag is used to define style information for a HTML document. Inside the <style> element you specify how html elements should render in a browser
The style tag can be placed between the head tag and also located with in the body tag.
syntax of style tag:
Important about the <style> tag :
The <style> element must be included inside the <head>.
The style tag is used to declare an internal stylesheet
In the style element we use html tag and also use the class for the formatting(bold, italic, increase/decrees the font-size, change background color etc...) of web/html document content.
It contains CSS which is applied to the HTML document.
The style tag specifies the "content-type" of stylesheet with its "type" attribute which should be set to "text/CSS".
You can use the multiple <style> element in html document.
The style tag supports the global attribute in HTML5.


Comments
Post a Comment