<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Declaring Canvas &#8211; Sibeesh Passion</title>
	<atom:link href="https://www.sibeeshpassion.com/tag/declaring-canvas/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.sibeeshpassion.com</link>
	<description>My passion towards life</description>
	<lastBuildDate>Fri, 17 Jul 2015 12:50:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>/wp-content/uploads/2017/04/Sibeesh_Passion_Logo_Small.png</url>
	<title>Declaring Canvas &#8211; Sibeesh Passion</title>
	<link>https://www.sibeeshpassion.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>HTML 5 Elements in a Look: Part II</title>
		<link>https://www.sibeeshpassion.com/html-5-elements-in-a-look-part-2/</link>
					<comments>https://www.sibeeshpassion.com/html-5-elements-in-a-look-part-2/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Thu, 29 Jan 2015 19:37:23 +0000</pubDate>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Declaring Canvas]]></category>
		<category><![CDATA[Declaring SVG]]></category>
		<category><![CDATA[How to use Canvas]]></category>
		<category><![CDATA[How to use SVG]]></category>
		<category><![CDATA[HTML5 Canvas]]></category>
		<category><![CDATA[Implementing Canvas in HTML5]]></category>
		<category><![CDATA[SVG creation]]></category>
		<guid isPermaLink="false">https://sibeeshpassion.com/?p=841</guid>

					<description><![CDATA[Introduction If you are new to HTML 5, I suggest you to read my first part article here: HTML 5 Elements in a Look: Part 1. New Attribute syntax In HTML 5, we have new attribute syntax as in the following: Empty Unquoted Double Quoted Single Quoted Example We can assign the text property of an input type as follows. [js] &#60;input type=”text” value=”Sibeesh” disabled&#62; &#60;input type=”text” value=Sibeesh&#62; &#60;input type=”text” value=”Sibeesh” &#62; &#60;input type=”text” value=’Sibeesh’ &#62; [/js] To make IE lower versions to read HTML5 elements: Add The Shiv [js] &#60;!–[if lt IE 9]&#62; &#60;script src=“http://html5shiv.googlecode.com/svn/trunk/html5.js”&#62;&#60;/script&#62; &#60;![endif]–&#62; [/js] Apply CSS [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p>If you are new to HTML 5, I suggest you to read my first part article here: <a href="http://www.c-sharpcorner.com/UploadFile/65794e/html-5-elements-in-a-look-part-1/">HTML 5 Elements in a Look: Part 1</a>.</p>
<p><strong>New Attribute syntax</strong></p>
<p>In HTML 5, we have new attribute syntax as in the following:</p>
<ul>
<li>Empty</li>
<li>Unquoted</li>
<li>Double Quoted</li>
<li>Single Quoted</li>
</ul>
<p><strong>Example</strong></p>
<p>We can assign the text property of an input type as follows.</p>
<p>[js]<br />
&lt;input type=”text” value=”Sibeesh” disabled&gt;<br />
&lt;input type=”text” value=Sibeesh&gt;<br />
&lt;input type=”text” value=”Sibeesh” &gt;<br />
&lt;input type=”text” value=’Sibeesh’ &gt;<br />
[/js]</p>
<p>To make IE lower versions to read HTML5 elements:</p>
<p>Add <strong>The Shiv</strong><br />
[js]<br />
&lt;!–[if lt IE 9]&gt;<br />
&lt;script src=“http://html5shiv.googlecode.com/svn/trunk/html5.js”&gt;&lt;/script&gt;<br />
&lt;![endif]–&gt;<br />
[/js]</p>
<p><strong>Apply CSS to Elements</strong></p>
<p>Since we can apply styles to our normal HTML4 elements, we can apply styles to our new semantic elements too.</p>
<p><strong>Example:</strong><br />
[html]<br />
footer{border:1px solid;}<br />
[/html]</p>
<p>The preceding style will be applied to all the footers available in a page.</p>
<p><strong>NB:</strong> Please be noted that it is not recommended (Footer, FOOTER) to use upper-case in the elements.</p>
<p><strong>Introduction to Canvas Element</strong></p>
<p>If you want to create some graphic content, the Canvas element is the right choice.</p>
<p>Let us see how to use it.</p>
<p><strong>Declaring the Canvas</strong><br />
[html]<br />
&lt;canvas id=“canvasExample” width=“200” height=“100”<br />
style=“border:1px solid #ccc;”&gt;<br />
Bad Luck, It seems your browser won’t support 🙁<br />
&lt;/canvas&gt;<br />
[/html]</p>
<p><strong>Implementing Canvas</strong><br />
[js]<br />
var c = document.getElementById(“canvasExample”); //Get the element<br />
var ctx = c.getContext(“2d”); // Get the context for the element<br />
var grd = ctx.createLinearGradient(0, 0, 200, 0); //Create the line<br />
grd.addColorStop(0, “blue”); // Apply the colors<br />
grd.addColorStop(1, “white”); // Apply the colors<br />
ctx.fillStyle = grd; //apply the style<br />
ctx.fillRect(10, 10, 150, 80); // Fill<br />
[/js]</p>
<p>Here we are applying the gradient to the canvasExample canvas.</p>
<p><strong>Introduction to SVG</strong></p>
<p>Scalable Vector Graphics is for implementing graphics for the web as canvas. One of the differences between canvas and SVG is that SVG supports event handlers but canvases don&#8217;t. We will discuss that later.</p>
<p><strong>Declaring SVG</strong><br />
[html]<br />
&lt;canvas id=“canvasExample” width=“200” height=“100”<br />
style=“border:1px solid #ccc;”&gt;<br />
Bad Luck, It seems your browser won’t support 🙁<br />
&lt;/canvas&gt;<br />
[/html]</p>
<p>See the complete HTML here<br />
[html]<br />
&lt;!DOCTYPE html&gt;<br />
&lt;html&gt;<br />
&lt;body&gt;<br />
    &lt;table style=“border:1px solid #ccc;”&gt;<br />
        &lt;tr style=“border:1px solid #ccc;”&gt;<br />
            &lt;td style=“border:1px solid #ccc;”&gt;<br />
                &lt;h2 style=“text-align:center;”&gt;Canvas&lt;/h2&gt;<br />
                &lt;canvas id=“canvasExample” width=“200” height=“100”<br />
                        style=“border:1px solid #ccc;”&gt;<br />
                    Bad Luck, It seems your browser won’t support 🙁<br />
                &lt;/canvas&gt;<br />
            &lt;/td&gt;<br />
            &lt;td style=“border:1px solid #ccc;”&gt;<br />
                &lt;h2 style=“text-align:center;”&gt;SVG&lt;/h2&gt;<br />
                &lt;svg width=“200” height=“200”&gt;<br />
                    &lt;circle cx=“100” cy=“100” r=“50”<br />
                            stroke=“green” stroke-width=“4” fill=“yellow” /&gt;<br />
                    Bad Luck, It seems your browser won’t support 🙁<br />
                &lt;/svg&gt;<br />
            &lt;/td&gt;<br />
        &lt;/tr&gt;<br />
    &lt;/table&gt;<br />
    &lt;script&gt;<br />
        var c = document.getElementById(“canvasExample”); //Get the element<br />
        var cctx = c.getContext(“2d”); // Get the context for the element<br />
        var grd = ctx.createLinearGradient(0, 0, 200, 0); //Create the line<br />
        grd.addColorStop(0, “blue”); // Apply the colors<br />
        grd.addColorStop(1, “white”); // Apply the colors<br />
        ctx.fillStyle = grd; //apply the style<br />
        ctx.fillRect(10, 10, 150, 80); // Fill<br />
    &lt;/script&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
[/html]</p>
<p>I hope you have tried this. See you soon with another set of elements in the next article.</p>
<p>Kindest Regards<br />
Sibeesh Venu</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sibeeshpassion.com/html-5-elements-in-a-look-part-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
