Canvas and SVG graphic Elements Of HTML 5: Basic HTML

May 31, 2014
Canvas and SVG elements
Graphics is an art of drawing which combines the images, pictures and colors. Graphics attracts every people. Most of the sites have used graphics in web by using images. But when HTML 5 was induced, there was no need to use the picture, some graphics can be done using HTML 5. Graphics in web can be done using 2 tags <canvas> and <SVG>.

<canvas> Tag:

<canvas> tag is often used to draw graphics on any web page. Canvas is a new html 5 elements. You can make color gradient, rectangle, triangle, circle and many vector drawings from the HTML 5. These elements are only supported by the new web browser like IE 9+, opera, Chrome etc. Indeed, canvas defines rectangular area on a web document. Lets see the syntax of use of <canvas>.

<canvas class="canvasimage" width="250" height="250"></canvas>

You should always define width and height attributes of canvas element. If you don't use these two attributes, there can not draw any images. Multiple canvas tags can be used in a single web document. Most of the attributes which can apply in a text that all can apply in the canvas element.
Example of Canvas element.

<!DOCTYPE html>
<html>
<body>
<canvas  style="border:3px dots #ffffff;" class="canvasid" width="310" height="310">
This text is shown because your browser doesnot support.
</canvas>
</body>
</html>

You also can use the javascript on canvas element. Using javascript, you can give many effects to canvas in web document.

<!DOCTYPE html>
<html>
<body>
<canvas class="canvaselement" width="350" height="155">
I think your browser doesnot support this html 5 tag.
</canvas>
<script type="text/javascript">
var can =document.getElementById("canvaselement");
var ctx=can.getContext("2d");
ctx.fillRect(2,3,125,60);
ctx.fillStyle="#00feef";
</script>
</body>
</html>

Canvas has two coordinates because it is two dimensional grid. We can use these methods to draw straight lines on canvas moveTo(a,b) which defines beginning point of the line and lineTo(a,b) which creates last or end point of the line.
We also write text in the canvas and give the gradients on canvas. Image can be also drawn by using canvas.

I have not written here more examples of canvas elements because you can see any examples from http://www.w3schools.com/html/html5_canvas.asp

<SVG> Tag

Now lets talke about SVG briefly. It stands for scalable vector graphics. Scalable Vector Graphics creates vector shapes for the web document. The main advantage of SVG is that it creates vectors shapes.

By the way there cannot see major differences between SVG and Canvas but there is some difference. Canvas is used to draw 2D graphics and in SVG, the drawn vector shapes are defined as objects.

Form Attributes of HTML 5

May 28, 2014
html5 form attributes
Attributes are like properties that acts some specific funtion in the tag. There are different attributes for different html tags. But today we are going to talk about the form attributes of HTML 5. There is two new form attributes that are induced for html 5.

  1. autocomplete
  2. novalidate

And input attributes are:
autocomplete, autofocus, formaction, form, formmethod, formenctype, formnovalidate, formtarget, height, width, list, min, max, multiple, pattern, required, placeholder step etc.]

autocomplete attribute:- autocomplete attribute is used to specify whether input field is On for autocomplete the fields or not.
It should be noted that autocomplete attribute is on for form but off for the email field. It works with input, form, password, text, datepicker, color and also range. Lets see an example how to use autocomplete attibute in form and form elements.

<form autocomplete="on"  action="radhika.html" name="form">
  Name:<input type="text" name="firstname"><br>
  Surname: <input type="text" name="lastname"><br>
  E-mail Address: <input type="email" autocomplete="off" name="email_address"><br>
  <input type="submit" name="submit">
</form>

 novalid attribute:- It is used not to valid the input data. The syntax of novalidate attribute is given below:

<form name="form" action="rakesh.html" novalidate>
Username: <input type="text" name="name"/>
</form>


  • autofocus attribute:- It is also a boolean attribute. It is used to focus automatically when the page is loaded. The given syntax shows you how you can use this attribute.


            Better Name:  <input type="text" name="better" autofocus>


  • Form attrbute:- form attribute is used ot define one or more than one forms in the form tag.


           Email: <input type="email" name="email" form="second_form">


  • formaction:- formaction attribute overrides the action attribute of form when the form is submitted. 
  • formmethod attribute:- Like the formaction, it does same but it overrides the method of form. Its syntax is same like the formaction and it is used also same place.
  • formtarget:- Likewise the formmethod and formaction, it overrisdes the target of form. 
  • height an width:- This attribute is used to define the height and width of the type input.
  • list:- List attrbute is used to list out the elements of type input.
  • min and max:- min attribute is used to define minimum value of type input and max is used to define max value.
  • multiple:- This is used to define those input who has multiple value like email , image.
  • pattern:- pattern is used for validation of type of input.
  • placeholder:- placeholder is used for hint. 
  • required:- It is used to make the field necessary to fill out.


How to Stop the Visitor's Flow in Another Sites

May 27, 2014
Now internet has been a part of our life. So as blogging has been a best way of sharing the knowledge to each other. When you start blogging you seems very interested in blogging but after sometimes when you don't see the viewers on your blogs then you get to be disappointing and you completely stop blogging. This is all happens because often, seo specialist or consultants think that lots of content, keywords, description and title bring lots of visitors on their blogs and websites. But I say this kind of thinking is completely harmful for their sites.

keep visitors

Nowadays there are lots of search engines but more than 70% internet users use the google search engine. Google is most famous and reliable search engine among the internet users. It has been constantly changing its algorithms of searching optimization techniques. So if you think lots of content, keywords, descriptions and title is best way of optimization, it has been totally wrong.

You can see in the given quick and valuable points for the better of the flow of visitors on your sites and blogs. This points is only for getting more visitors on your sites and blogs.


  • First of all you should avoid all the distracting features like complex and more animated sliders and scrolling side bars and sliders. All this can irritate yor viewers.
  • Use short and sweet content and make all the content in paragraphwise. Just use bullets and numbers for the better understanding of your visitors.
  • Make anchor text to the valuable sites which can give more information.
  • You should get to the point quickly and manage your content.
  • Video embedding can be better because video reveals everything in a few times. It can shorten your complex information of the text information. 


HTML 5 Semantic Elements Meaning

May 27, 2014
html 5 semantic elements
HTML semantic elements are those elements that describe its meaning to the browser and designer and developer. Unlike the semantic elements non semantic elements does not define any meaning. We can take <div> and <span> as non semantic elements which give or describe nothing to browser and designer or developer.

So <table>, <form> and <img> can be taken as semantic because which clearly define its meaning why they are using and where they should be use. HTML 5 semantics are only supported by the new version of browsers like explorer 9+, safari, chrome etc. Actually html5 is induced to reduce the javascript from the document but it also reduces the unnecessary div.

Most of the existing sites still use <div> tag to create menu, footer, header but html 5 classes them as different tags. Here is the offers of html 5 new semantic elements that define a new different part of web document.

<header>,<nav>,<section>,<article>,<aside>,<figure>,<figcaption>,<footer>,<summary>,<details>,<time>,<mark> etc.

The given semantic elements clearly define its own meanings. header is for head section, nav is for navbar or menu, section is for particular section of document and then article is for the article of the page. Likewise all other elements have their different meaning.

In the above figure, you can see how we arrange html 5 semantic elements in designing. If it is not arrange in its real order, it can not function its real works. So think how it should be used and then apply it to your html document code.

JavaScript Language In HTML: Basic HTML

May 27, 2014
JavaScript Language
We will learn more about JavaScript in the next lesson, so here is you only can find the introduction of the javascript and how it is used in html document.

Javascript is client side scripting language which is one of the most important web designing langauge among the html, css and javascript. <script> tag is used to create a script in the html document. Basically javascript is used to manipulate the images, to validate the form and to change the content dynamically. JavaScript only work with HTML and CSS. The given below example can be the best for the basic of javascript.

Actually javascript is very easy language to learn. Nowadays, most of the designers use this language to develop webpages.

Javascript is very powerful language which can change HTML elements and it also can change the attributes of html and css elements. We will give all the examples that are needed for learning all the the html elements change, attributes change, css elements change.

<html>
<body>
<script>
var a="Excuse me";

document.write("Hello Dude!")

alert("Hi buddy");

document.write(a);
</script>
</body>
</html>


If we use the <noscript> tag, When there is javascript disabled by the browser, the message written in the <noscript> tag will be shown by the browser. Lets see the given example how nosript tag is used and it works.


<html>
<body>
<script>
document.write("Excuse Me Buddy")
</script>
<noscript>Sorry, some problems occurred here.</noscript>
<p>Javascript doesnot work if the script is disabled in the browser.</p>
</body>
</html>

Indeed you should know that <script> and <noscript> both are reverse of each other. But <script> is mostly used by developer rather than <noscript>.


If you have any questions, please comment us. 
Thank you.