Sunday, 30 August 2015

Html Head

Html Head:

Html <head> Element:

<head> element is container for metadata means data about data.
Html metadata is about Html document.Metadata is not displayed.
Metadata defines document title,scripts, styles, links, and other meta information.
Following tags describe metadata:
<title>,<style>,<link>,<base> and <script>.

<html> and <body> Omitting?

<html>tag, <body> tag, and <head> tag can be omitted,In Standard Html5.
Following code will validate Html5;

Example:


<html> element is document root.It is recommended place for specifying page language.

Declaring language is important for search engines.
Omitting <html> and <body> can crash badly written XML/DOM software.
Omitting <body> can produce error in older browsers.

Omitting <head>:

In html 5 ,<head> tag can also be omitted.
Browser will add all elements before <body. to default <head> element.
By omitting ,<head> tag you can reduce complexity.

Example:


Html <title> Element:

<title> element defines title of document.
<title> element is required in all Html/Xhtml documents.
The title element:
1)Defines title in browser
2)Provides title for page when it is added to favourites.
3)Displays title for page in search engine results.
Simplified html document;

Example:


Html <style> Element:

<style> element defines style information for Html document.
Inside <style> element you specify hoe Html elements should render in bowser;

Example:


Html <link> Element:

<link> element defines page relationship to an external resource.
<link> element is most often used to link style sheets;

Example:


Html <meta> Element:

<meta> element is used to specify page discription, author, keywords, search engine, and other services.

Define keywords for search engines:


Define discription of your page:


Define character set used :


Define author:


Refresh document after every 30 seconds:


<meta> tags Example:


Html <script> Element:

<script> element is used to define client side Javascript.

Example:


Html <base> Element:

<base> element specifies base URL.

Example:


Html Head Elements:


No comments:

Post a Comment