Thiruppathi Muthukumar
Web Developer
Thiruppathi Muthukumar
Introduction
Prerequisites
Developer Tools & Extension
Useful Tools & Browser extensions
HTML5
Introduction – Structure of the Document – Paragraphs & Texts - Figures & Images – Lists – Tables – Forms – Form Validation – Video – Canvas – SVG
CSS3
Introduction - Font & Text – Color & Background – List & Table – Box – Font-Face – Media Queries
jQuery
Introduction – Functions & Selectors – Modifying DOM – Events
Further Learning
Where to go from here.
Prerequisites
HTML
CSS
JavaScript
References
<!DOCTYPE html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Lengthy-SearchInGoogle-CopyPaste-DocType of HTML4
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="hello.css">
<script type="text/javascript" src="hello.js"></script>
Fat <meta> tag
Type mentions in <link> & <script>
<!-- Lengthy-SearchInGoogle-CopyPaste-DocType of HTML4-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!--EasyToRemember-NoCopyPaste-DocType of HTML5-->
<!doctype html>
<!-- Fatty meta -->
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!-- HourGlass meta -->
<meta charset="utf-8">
<link type="text/css" rel="stylesheet" href="hello.css">
<!--Default Styling Standard -->
<link rel="stylesheet" href="layout.css">
<script type="text/javascript" src="lounge.js"></script>
<!--Deafult Scripting for HTML5 -->
<script src="menu.js"></script>
<header>
<nav>
<section>
<aside>
<footer>
"Not semantics are useless but its not worth worrying over minute detail on."
tl;dr
tl;dr
In Books & Magazines, pictures, illustrations, charts are accompanied by a caption. HTML5 hopes to solve this problem by introducing,
<figure>
<img src="http://i.imgur.com/DkioMUo.gif" />
<figcaption>
<h2>UI Developer fixing layout issue</h2>
</figcaption>
</figure>
Following <tags> are used to create and format the Headers & Footers of your Table
<!-- To group content as the header of a table for formatting purposes-->
<thead>
<tr>
<!-- To denote a table header cell – th stands for table header -->
<th></th>
</tr>
</thead>
<!-- To group table content to format it as the body of the table-->
<tbody>
<tr><td>Thiru</td></tr>
<tbody>
<!-- To group footer information for your table for formatting purposes. -->
<tfoot>
<tr><td>Years of Experience</td></tr>
</tfoot>
HTML5 Form elements & attributes provide greater degree of semantic markup.
Date Pickers
Search Boxes
Color Pickers
Form Validation
Required Fields
Data List
Regular Expression
Placeholder
Autofocus Fields
Email Address
Telephone Number
Web Address - URL
Numbers as SpinBox
Numbers as Sliders
<object width="400" height="50" data="bookmark.swf"></object>
<object width="100%" height="500px" data="snippet.html"></object>
<embed width="400" height="50" src="bookmark.swf">
<iframe width="420" height="315"
src="http://www.youtube.com/embed/XGSy3_Czz8k">
</iframe>
Struggling?
HTML5 element, where content is rendered by Javascript.
1. Place the <canvas> element inside HTML
2. Access the element inside Javascript
3. Create a Context
4. Utilise HTML5 Canvas API to draw visualisation
To draw a line using HTML5, we can use the following methods
beginPath()
moveTo()
lineTo()
stroke()
To declare we are about to draw a new path
To position the context point; i.e., the drawing cursor
To draw a straight line from position a to position b
Makes the line visible by applying stroke. Default color is black
Line Width
context.lineWidth = 15;
It should be called before stroke() method
Line Color
context.strokeStyle = '#2245e7';
arc(x, y, radius, startAngle, endAngle, counterClockwise);
var canvas = document.getElementById('myCanvas');
var context = canvas.getContext('2d');
context.beginPath();
context.rect(188, 50, 200, 100);
context.fillStyle = 'yellow';
context.fill();
context.lineWidth = 7;
context.strokeStyle = 'black';
context.stroke();
var canvas = document.getElementById('myCanvas');
var context = canvas.getContext('2d');
var centerX = canvas.width / 2;
var centerY = canvas.height / 2;
var radius = 70;
context.beginPath();
context.arc(centerX, centerY, radius, 0, 2 * Math.PI, false);
context.fillStyle = '#689F38';
context.fill();
context.lineWidth = 5;
context.strokeStyle = '#727272';
context.stroke();
context.closePath();
context.lineWidth = 5;
context.fillStyle = '#8ED6FF';
context.fill();
context.strokeStyle = 'blue';
context.stroke();
var canvas = document.getElementById('myCanvas');
var context = canvas.getContext('2d');
context.rect(0, 0, canvas.width, canvas.height);
// add linear gradient
var grd = context.createLinearGradient(0, 0, canvas.width, canvas.height);
// light blue
grd.addColorStop(0, '#8ED6FF');
// dark blue
grd.addColorStop(1, '#004CB3');
context.fillStyle = grd;
context.fill();
var canvas = document.getElementById('myCanvas');
var context = canvas.getContext('2d');
context.rect(0, 0, canvas.width, canvas.height);
// create radial gradient
var grd = context.createRadialGradient(238, 50, 10, 238, 50, 300);
// light blue
grd.addColorStop(0, '#8ED6FF');
// dark blue
grd.addColorStop(1, '#004CB3');
context.fillStyle = grd;
context.fill();
var canvas = document.getElementById('myCanvas');
var context = canvas.getContext('2d');
var imageObj = new Image();
imageObj.onload = function() {
var pattern = context.createPattern(imageObj, 'repeat');
context.rect(0, 0, canvas.width, canvas.height);
context.fillStyle = pattern;
context.fill();
};
imageObj.src = 'http://www.8icon.com/public/png/iconshock-batman-Logo-48.png';
<svg width="100" height="100">
<circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" />
</svg>
<svg width="400" height="110">
<rect width="300" height="100"
style="fill:rgb(0,0,255);stroke-width:3;stroke:rgb(0,0,0)" />
</svg>
Introduction
Font & Text properties
Color & Background properties
List & Table properties
Box properties
Font-Face
Media Queries
References
Introduction
Functions & Selectors
Modifying HTML Elements
jQuery Events
References
By Thiruppathi Muthukumar