Sponsored sites

Showing posts with label HTML 5 Tutorial. Show all posts
Showing posts with label HTML 5 Tutorial. Show all posts

Saturday, 11 October 2014

HTML5 - Color Code Builder

You need to decorate your HTML pages using different colors. HTML5 provides a vide range of attribute which can be used to set background color, font color etc.
To use colors in your HTML5 pages you would need valid color codes. Following two tools would help you generate valid HTML5 color codes.

Java Servlet Color Picker:

  • Click on a color which you like and pickup equivalent color code to use in your HTML code or CSS.
  • All the code generated by this palette will be in Hexa.
  • This Color Palette requires JAVA enabled browser.


JQuery Color Picker:

  • Click on a color which you like and pickup equivalent color code to use in your HTML code or CSS.
  • All the code generated by this palette will be in Hexa.


HTML5 Validation

At the time of writing this tutorial HTML5 is very much in initial stage and there are only few validtors available on the net.
But following two validators are very authentic and can be used:

(1) The W3C Markup Validator:

The W3C Markup Validator checks the markup validity of Web documents in HTML, XHTML, SMIL, MathML, etc. This validator is part of Unicorn, W3C's unified validator service.
To use this validator for HTML5, you need to use More Options and select Document Type as HTML5 (experimental) as shown below.
W3C Markup Validation

(2) The Validator.nu (X)HTML5 Validator:

Here is the another currently known HTML5 validators: Henri's Validator.nu (X)HTML5 Validator (Highly Experimental):
Validator.nu (X)HTML5 Validator
This validator has compatibility problem, so you can try it in lower versions of IE or Mozilla.

HTML5 Modernizr Tutorial

Modernizr is a small JavaScript Library that detects the availability of native implementations for next-generation web technologies
There are several new features which are being introduced through HTML5 and CSS3 but same time many browsers do not support these news features.
Modernizr provides an easy way to detect any new feature so that you can take corresponding action. For example, if a browser does not support video feature then you would like to display a simple page.
You can create CSS rules based on the feature availability and these rules would apply automatically on the webpage if browser does not support a new featur.
You can download latest version of this utility from Modernizr Download.

Syntax:

Before you start using Modernizr, you would have to include its javascript library in your HTML page header as follows:
<script src="modernizr.min.js" type="text/javascript"></script>
As mentioned above, you can create CSS rules based on the feature availability and these rules would apply automatically on the webpage if browser does not support a new featur.
Following is the simple syntax to handle supported and non supported features:
/* In your CSS: */
.no-audio #music {
   display: none; /* Don't show Audio options */
}
.audio #music button {
   /* Style the Play and Pause buttons nicely */
}

<!-- In your HTML: -->
<div id="music">
   <audio>
      <source src="audio.ogg" />
      <source src="audio.mp3" />
   </audio>
   <button id="play">Play</button>
   <button id="pause">Pause</button>
</div>
Here it is notable that you need to prefix "no-" to every feature/property you want to handle for the browser which does not support them.
Following is the syntax to detect a particular feature through Javascript:
if (Modernizr.audio) {
     /* properties for browsers that
     support audio */
}else{
     /* properties for browsers that
     does not support audio */
}
To learn above concept - Do Online Practice using different browsers.

Features detected by Modernizr:

Following is the list of features which can be detected by Modernizr:
FeatureCSS PropertyJavaScript Check
@font-face.fontface Modernizr.fontface
Canvas.canvas Modernizr.canvas
Canvas Text.canvastext Modernizr.canvastext
HTML5 Audio.audio Modernizr.audio
HTML5 Audio formatsNAModernizr.audio[format]
HTML5 Video.videoModernizr.video
HTML5 Video FormatsNAModernizr.video[format]
rgba().rgba Modernizr.rgba
hsla().hsla Modernizr.hsla
border-image.borderimage Modernizr.borderimage
border-radius.borderradius Modernizr.borderradius
box-shadow.boxshadow Modernizr.boxshadow
Multiple backgrounds.multiplebgs Modernizr.multiplebgs
opacity.opacity Modernizr.opacity
CSS Animations.cssanimations Modernizr.cssanimations
CSS Columns.csscolumns Modernizr.csscolumns
CSS Gradients.cssgradients Modernizr.cssgradients
CSS Reflections.cssreflections Modernizr.cssreflections
CSS 2D Transforms.csstransforms Modernizr.csstransforms
CSS 3D Transforms.csstransforms3d Modernizr.csstransforms3d
CSS Transitions.csstransitions Modernizr.csstransitions
Geolocation API.geolocation Modernizr.geolocation
Input TypesNAModernizr.inputtypes[type]
Input AttributesNAModernizr.input[attribute]
localStorage.localstorage Modernizr.localstorage
sessionStorage.sessionstorage Modernizr.sessionstorage
Web Workers.webworkersModernizr.webworkers
applicationCache.applicationcache Modernizr.applicationcache
SVG.svg Modernizr.svg
SVG Clip Paths.svgclippaths Modernizr.svgclippaths
SMIL.smil Modernizr.smil
Web SQL Database.websqldatabaseModernizr.websqldatabase
IndexedDB.indexeddb Modernizr.indexeddb
Web Sockets.websockets Modernizr.websockets
Hashchange Event.hashchange Modernizr.hashchange
History Management.historymanagement Modernizr.historymanagement
Drag and Drop.draganddrop Modernizr.draganddrop
Cross-window Messaging.crosswindowmessaging Modernizr.crosswindowmessaging
addTest() Plugin APINAModernizr.addTest(str,fn)

HTML5 - Character Encodings

A character encoding is a method of converting bytes into characters. To validate or display an HTML document, a program must choose a character encoding. HTML 5 authors have three means of setting the character encoding:

HTTP Content-Type Header:

If you are writing cgi or similar program then you would use HTTP Content-Type header to set any character encoding.
Following is the simple example:
print "Content-Type: text/html; charset=utf-8\r\n";

The <meta> element:

You can use a <meta> element with a charset attribute that specifies the encoding within the first 512 bytes of the HTML5 document.
Following is the simplified example:
<meta charset="UTF-8">
Above syntax replaces the need for <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> although that syntax is still allowed.

Unicode Byte Order Mark (BOM):

A byte order mark (BOM) consists of the character code U+FEFF at the beginning of a data stream, where it can be used as a signature defining the byte order and encoding form, primarily of unmarked plaintext files.
Many Windows programs (including Windows Notepad) add the bytes 0xEF, 0xBB, 0xBF at the start of any document saved as UTF-8. This is the UTF-8 encoding of the Unicode byte order mark (BOM), and is commonly referred to as a UTF-8 BOM even though it is not relevant to byte order.
For HTML5 document, you can use a Unicode Byte Order Mark (BOM) character at the start of the file. This character provides a signature for the encoding used.

HTML5 - Entities Reference

Characters Entities in HTML5

Some characters are reserved in HTML5. For example, you cannot use the greater than and less than signs or angle brackets within your text because the browser could mistake them for markup.
HTML5 processors must support the five special characters listed in the table that follows.
Symbol Description Entity Name Number Code
" quotation mark &quot; &#34;
' apostrophe  &apos; &#39;
& ampersand &amp; &#38;
< less-than &lt; &#60;
> greater-than &gt; &#62;
To write an element and attribute into your page so that the code is shown to the user rather than being processed by the browser (for example as <div id="character">) you would write:
&div id=&quot;character&quot;&gt;
There is also a long list of special characters that HTML5 aware processors should support. In order for these to appear in your document, you can use either the numerical code or the entity name. For example, to insert a copyright symbol you could use either of the following:
&copy; 2007
 
or
 
&#169; 2007
ISO 8859-1 Character set is the most widly used character set. A complete reference of ISO 885901 character set is gievn below.

ISO 8859-1 Symbol Entities

Result Description Entity Name Number Code
  non-breaking space &nbsp; &#160;
¡ inverted exclamation mark &iexcl; &#161;
¤ currency &curren; &#164;
¢ cent &cent; &#162;
£ pound &pound; &#163;
¥ yen &yen; &#165;
¦ broken vertical bar &brvbar; &#166;
§ section &sect; &#167;
¨ spacing diaeresis &uml; &#168;
© copyright &copy; &#169;
ª feminine ordinal indicator &ordf; &#170;
« angle quotation mark (left) &laquo; &#171;
¬ negation &not; &#172;
­ soft hyphen &shy; &#173;
® registered trademark &reg; &#174;
trademark &trade; &#8482;
¯ spacing macron &macr; &#175;
° degree &deg; &#176;
± plus-or-minus  &plusmn; &#177;
² superscript 2 &sup2; &#178;
³ superscript 3 &sup3; &#179;
´ spacing acute &acute; &#180;
µ micro &micro; &#181;
paragraph &para; &#182;
· middle dot &middot; &#183;
¸ spacing cedilla &cedil; &#184;
¹ superscript 1 &sup1; &#185;
º masculine ordinal indicator &ordm; &#186;
» angle quotation mark (right) &raquo; &#187;
¼ fraction 1/4 &frac14; &#188;
½ fraction 1/2 &frac12; &#189;
¾ fraction 3/4 &frac34; &#190;
¿ inverted question mark &iquest; &#191;
× multiplication &times; &#215;
÷ division &divide; &#247;

ISO 8859-1 Character Entities

Result Description Entity Name Number Code
À capital a, grave accent &Agrave; &#192;
Á capital a, acute accent &Aacute; &#193;
 capital a, circumflex accent &Acirc; &#194;
à capital a, tilde &Atilde; &#195;
Ä capital a, umlaut mark &Auml; &#196;
Å capital a, ring &Aring; &#197;
Æ capital ae &AElig; &#198;
Ç capital c, cedilla &Ccedil; &#199;
È capital e, grave accent &Egrave; &#200;
É capital e, acute accent &Eacute; &#201;
Ê capital e, circumflex accent &Ecirc; &#202;
Ë capital e, umlaut mark &Euml; &#203;
Ì capital i, grave accent &Igrave; &#204;
Í capital i, acute accent &Iacute; &#205;
Î capital i, circumflex accent &Icirc; &#206;
Ï capital i, umlaut mark &Iuml; &#207;
Ð capital eth, Icelandic &ETH; &#208;
Ñ capital n, tilde &Ntilde; &#209;
Ò capital o, grave accent &Ograve; &#210;
Ó capital o, acute accent &Oacute; &#211;
Ô capital o, circumflex accent &Ocirc; &#212;
Õ capital o, tilde &Otilde; &#213;
Ö capital o, umlaut mark &Ouml; &#214;
Ø capital o, slash &Oslash; &#216;
Ù capital u, grave accent &Ugrave; &#217;
Ú capital u, acute accent &Uacute; &#218;
Û capital u, circumflex accent &Ucirc; &#219;
Ü capital u, umlaut mark &Uuml; &#220;
Ý capital y, acute accent &Yacute; &#221;
Þ capital THORN, Icelandic &THORN; &#222;
ß small sharp s, German &szlig; &#223;
à small a, grave accent &agrave; &#224;
á small a, acute accent &aacute; &#225;
â small a, circumflex accent &acirc; &#226;
ã small a, tilde &atilde; &#227;
ä small a, umlaut mark &auml; &#228;
å small a, ring &aring; &#229;
æ small ae &aelig; &#230;
ç small c, cedilla &ccedil; &#231;
è small e, grave accent &egrave; &#232;
é small e, acute accent &eacute; &#233;
ê small e, circumflex accent &ecirc; &#234;
ë small e, umlaut mark &euml; &#235;
ì small i, grave accent &igrave; &#236;
í small i, acute accent &iacute; &#237;
î small i, circumflex accent &icirc; &#238;
ï small i, umlaut mark &iuml; &#239;
ð small eth, Icelandic &eth; &#240;
ñ small n, tilde &ntilde; &#241;
ò small o, grave accent &ograve; &#242;
ó small o, acute accent &oacute; &#243;
ô small o, circumflex accent &ocirc; &#244;
õ small o, tilde &otilde; &#245;
ö small o, umlaut mark &ouml; &#246;
ø small o, slash &oslash; &#248;
ù small u, grave accent &ugrave; &#249;
ú small u, acute accent &uacute; &#250;
û small u, circumflex accent &ucirc; &#251;
ü small u, umlaut mark &uuml; &#252;
ý small y, acute accent &yacute; &#253;
þ small thorn, Icelandic &thorn; &#254;
ÿ small y, umlaut mark &yuml; &#255;

Other Entities Supported by HTML5 Browser:

Result Description Entity Name Number Code
Œ capital ligature OE &OElig; &#338;
œ small ligature oe &oelig; &#339;
Š capital S with caron &Scaron; &#352;
š small S with caron &scaron; &#353;
Ÿ capital Y with diaeres &Yuml; &#376;
ˆ modifier letter circumflex accent &circ; &#710;
˜ small tilde &tilde; &#732;
en space &ensp; &#8194;
em space &emsp; &#8195;
thin space &thinsp; &#8201;
zero width non-joiner &zwnj; &#8204;
zero width joiner &zwj; &#8205;
left-to-right mark &lrm; &#8206;
right-to-left mark &rlm; &#8207;
en dash &ndash; &#8211;
em dash &mdash; &#8212;
left single quotation mark &lsquo; &#8216;
right single quotation mark &rsquo; &#8217;
single low-9 quotation mark &sbquo; &#8218;
left double quotation mark &ldquo; &#8220;
right double quotation mark &rdquo; &#8221;
double low-9 quotation mark &bdquo; &#8222;
dagger &dagger; &#8224;
double dagger &Dagger; &#8225;
horizontal ellipsis &hellip; &#8230;
per mille  &permil; &#8240;
single left-pointing angle quotation &lsaquo; &#8249;
single right-pointing angle quotation &rsaquo; &#8250;
euro &euro; &#8364;

HTML5 - URL Encoding

URL encoding is the practice of translating unprintable characters or characters with special meaning within URLs to a representation that is unambiguous and universally accepted by web browsers and servers. These characters include:
  • ASCII control characters - Unprintable characters typically used for output control. Character ranges 00-1F hex (0-31 decimal) and 7F (127 decimal). A complete encoding table is given below.
  • Non-ASCII control characters - These are characters beyond the ASCII character set of 128 characters. This range is part of the ISO-Latin character set and ncludes the entire "top half" of the ISO-Latin set 80-FF hex (128-255 decimal). A complete encoding table is given below.
  • Reserved characters - These are special characters such as the dollar sign, ampersand, plus, common, forward slash, colon, semi-colon, equals sign, question mark, and "at" symbol. All of these can have different meanings inside a URL so need to be encoded. A complete encoding table is given below.
  • Unsafe characters - These are space, quotation marks, less than symbol, greater than symbol, pound character, percent character, Left Curly Brace, Right Curly Brace , Pipe, Backslash, Caret, Tilde, Left Square Bracket , Right Square Bracket, Grave Accent. These character present the possibility of being misunderstood within URLs for various reasons. These characters should also always be encoded. A complete encoding table is given below.
The encoding notation replaces the desired character with three characters: a percent sign and two hexadecimal digits whose correspond to the position of the character in the ASCII character set.

Example:

One of the most common special characters is the space. You can't type a space in a URL directly. A space position in the character set is 20 hexadecimal. So you can use %20 in place a space when passing your request to the server.
http://www.example.com/new%20pricing.html
This URL actually retrieves a document named new pricing.html from the www.example.com

ASCII control characters encoding

This includes the encoding for character ranges 00-1F hex (0-31 decimal) and 7F (127 decimal)
DecimalHex ValueCharacterURL Encode
000 
101 %01
202 %02
303 %03
404 %04
505 %05
606 %06
707 %07
808backspace%08
909tab%09
100alinefeed%0a
110b %0b
120c %0c
130dcarriage return%0d
140e %0e
150f %0f
1610 %10
1711 %11
1812 %12
1913 %13
2014 %14
2115 %15
2216 %16
2317 %17
2418 %18
2519 %19
261a %1a
271b %1b
281c %1c
291d %1d
301e %1e
311f %1f
1277f %7f

Non-ASCII control characters encoding

This includes the encoding for the entire "top half" of the ISO-Latin set 80-FF hex (128-255 decimal.)
DecimalHex ValueCharacterURL Encode
12880%80
12981%81
13082%82
13183ƒ%83
13284%84
13385%85
13486%86
13587%87
13688ˆ%88
13789%89
1388aŠ%8a
1398b%8b
1408cŒ%8c
1418d%8d
1428eŽ%8e
1438f%8f
14490%90
14591%91
14692%92
14793%93
14894%94
14995%95
15096%96
15197%97
15298˜%98
15399%99
1549aš%9a
1559b%9b
1569cœ%9c
1579d%9d
1589ež%9e
1599fŸ%9f
160a0 %a0
161a1¡%a1
162a2¢%a2
163a3£%a3
164a4¤%a4
165a5¥%a5
166a6¦%a6
167a7§%a7
168a8¨%a8
169a9©%a9
170aaª%aa
171ab«%ab
172ac¬%ac
173ad­%ad
174ae®%ae
175af¯%af
176b0°%b0
177b1±%b1
178b2²%b2
179b3³%b3
180b4´%b4
181b5µ%b5
182b6%b6
183b7·%b7
184b8¸%b8
185b9¹%b9
186baº%ba
187bb»%bb
188bc¼%bc
189bd½%bd
190be¾%be
191bf¿%bf
192c0À%c0
193c1Á%c1
194c2Â%c2
195c3Ã%c3
196c4Ä%c4
197c5Å%c5
198c6Æ%v6
199c7Ç%c7
200c8È%c8
201c9É%c9
202caÊ%ca
203cbË%cb
204ccÌ%cc
205cdÍ%cd
206ceÎ%ce
207cfÏ%cf
208d0Ð%d0
209d1Ñ%d1
210d2Ò%d2
211d3Ó%d3
212d4Ô%d4
213d5Õ%d5
214d6Ö%d6
215d7×%d7
216d8Ø%d8
217d9Ù%d9
218daÚ%da
219dbÛ%db
220dcÜ%dc
221ddÝ%dd
222deÞ%de
223dfß%df
224e0à%e0
225e1á%e1
226e2â%e2
227e3ã%e3
228e4ä%e4
229e5å%e5
230e6æ%e6
231e7ç%e7
232e8è%e8
233e9é%e9
234eaê%ea
235ebë%eb
236ecì%ec
237edí%ed
238eeî%ee
239efï%ef
240f0ð%f0
241f1ñ%f1
242f2ò%f2
243f3ó%f3
244f4ô%f4
245f5õ%f5
246f6ö%f6
247f7÷%f7
248f8ø%f8
249f9ù%f9
250faú%fa
251fbû%fb
252fcü%fc
253fdý%fd
254feþ%fe
255ffÿ%ff

Reserved characters encoding

Following is the table to be used to encode reserved characters.
DecimalHex ValueCharURL Encode
3624$%24
3826&%26
432b+%2b
442c,%2c
472f/%2f
583a:%3a
593b;%3b
613d=%3d
633f?%3f
6440@%40

Unsafe characters encoding

Following is the table to be used to encode unsafe characters.
DecimalHex ValueCharURL Encode
3220space%20
3422"%22
603c<%3c
623e>%3e
3523#%23
3725%%25
1237b{%7b
1257d}%7d
1247c|%7c
925c\%5c
945e^%5e
1267e~%7e
915b[%5b
935d]%5d
9660`%60

HTML5 - Fonts Reference

Fonts are specific to platform. If you are using different OS then you will have different look and feel of any web page. Here we are giving a list of fonts which are available to various operating systems.
HTML <FONT> tag is deprecated in version 4.0 onwards and now all fonts are set by using CSS. Here is the simple syntax of setting font of a body of web page.
body { font-family: "new century schoolbook"; }
 
or
 
<body style="font-family:new century schoolbook;" >
To Become more comfortable - Do Online Practice

Fonts for Microsoft OS and Browsers:

Font Font Font
Andale Mono Arial Arial Bold
Arial Italic Arial Bold Italic Arial Black
Comic Sans MS Comic Sans MS Bold Courier New
Courier New Bold Courier New Italic Courier New Bold Italic
Georgia Georgia Bold Georgia Italic
Georgia Bold Italic Impact Lucida Console
Lucida Sans Unicode Marlett Minion Web
Symbol Times New Roman Times New Roman Bold
Times New Roman Italic Times New Roman Bold Italic Tahoma
Trebuchet MS Trebuchet MS Bold Trebuchet MS Italic
Trebuchet MS Bold Italic Verdana Verdana Bold
Verdana Italic Verdana Bold Italic Webdings
You can have more information on Microsoft Fonts at http://www.microsoft.com/typography/fonts.
You can check example fonts here: Microsoft Fonts Examples

Fonts for Macintosh Systems:

Following is the list of fonts supported by Macintosh System 7 and higher versions
Font Font Font
American Typewriter Andale Mono Apple Chancery
Arial Arial Black Brush Script
Baskerville Big Caslon Comic Sans MS
Copperplate Courier New Gill Sans
Futura Herculanum Impact
Lucida Grande Marker Felt Optima
Trebuchet MS Verdana Webdings
Palatino Symbol Times
Osaka Papyrus Times New Roman
Textile Zapf Dingbats Zapfino
Techno Hoefler Text Skia
Hoefler Text Ornaments Capitals Charcoal
Gadget Sand  
You can check example fonts here: Mac Fonts Examples

Fonts for Unix Systems:

Following is the list of fonts supported by most Unix System variants
Font Font Font
Charter Clean Courier
Fixed Helvetica Lucida
Lucida bright Lucida Typewriter New Century Schoolbook
Symbol Terminal Times
Utopia    
You can check example fonts here: Unix Fonts Examples

HTML5 - Color Names

The following table shows 16 color names that were introduced in HTML 3.2 to support 16 colors that 8-bit graphics cards offered:
Color NameHex ValueColorShow
aqua#00ffff
Demo
black#000000
Demo
blue#0000ff
Demo
fuchsia#ff00ff
Demo
green#008000
Demo
gray#808080
Demo
lime#00ff00
Demo
maroon#800000
Demo
navy#000080
Demo
olive#808000
Demo
purple#800080
Demo
red#ff0000
Demo
silver#c0c0c0
Demo
teal#008080
Demo
white#ffffff
Demo
yellow#ffff00
Demo
There are other colors which are not part of HTML or XHTML but they are supported by most of the versions of IE or Netscape.
Color NameHex ValueColorShow
aliceblue#f0f8ff
Demo
antiquewhite#faebd7
Demo
aquamarine#7fffd4
Demo
azure#f0ffff
Demo
beige#f5f5dc
Demo
bisque#ffe4c4
Demo
blanchedalmond#ffebcd
Demo
blueviolet#8a2be2
Demo
brown#a52a2a
Demo
burlywood#deb887
Demo
cadetblue#5f9ea0
Demo
chartreuse#7fff00
Demo
chocolate#d2691e
Demo
coral#ff7f50
Demo
cornflowerblue#6495ed
Demo
cornsilk#fff8dc
Demo
crimson#dc143c
Demo
cyan#00ffff
Demo
darkblue#00008b
Demo
darkcyan#008b8b
Demo
darkgoldenrod#b8860b
Demo
darkgray#a9a9a9
Demo
darkgreen#006400
Demo
darkkhaki#bdb76b
Demo
darkmagenta#8b008b
Demo
darkolivegreen#556b2f
Demo
darkorange#ff8c00
Demo
darkorchid#9932cc
Demo
darkred#8b0000
Demo
darksalmon#e9967a
Demo
darkseagreen#8fbc8f
Demo
darkslateblue#483d8b
Demo
darkslategray#2f4f4f
Demo
darkturquoise#00ced1
Demo
darkviolet#9400d3
Demo
deeppink#ff1493
Demo
deepskyblue#00bfff
Demo
dimgray#696969
Demo
dodgerblue#1e90ff
Demo
firebrick#b22222
Demo
floralwhite#fffaf0
Demo
forestgreen#228b22
Demo
gainsboro#dcdcdc
Demo
ghostwhite#f8f8ff
Demo
gold#ffd700
Demo
goldenrod#daa520
Demo
gray#808080
Demo
greenyellow#adff2f
Demo
honeydew#f0fff0
Demo
hotpink#ff69b4
Demo
indianred#cd5c5c
Demo
indigo#4b0082
Demo
ivory#fffff0
Demo
khaki#f0e68c
Demo
lavender#e6e6fa
Demo
lavenderblush#fff0f5
Demo
lawngreen#7cfc00
Demo
lemonchiffon#fffacd
Demo
lightblue#add8e6
Demo
lightcoral#f08080
Demo
lightcyan#e0ffff
Demo
lightgoldenrodyellow#fafad2
Demo
lightgreen#90ee90
Demo
lightgrey#d3d3d3
Demo
lightpink#ffb6c1
Demo
lightsalmon#ffa07a
Demo
lightseagreen#20b2aa
Demo
lightskyblue#87cefa
Demo
lightslategray#778899
Demo
lightsteelblue#b0c4de
Demo
lightyellow#ffffe0
Demo
limegreen#32cd32
Demo
linen#faf0e6
Demo
magenta#ff00ff
Demo
mediumblue#0000cd
Demo
mediumorchid#ba55d3
Demo
mediumpurple#9370db
Demo
midnightblue#191970
Demo
mistyrose#ffe4e1
Demo
moccasin#ffe4b5
Demo
oldlace#fdf5e6
Demo
orange#ffa500
Demo
orchid#da70d6
Demo
peachpuff#ffdab9
Demo
peru#cd853f
Demo
pink#ffc0cb
Demo
plum#dda0dd
Demo
purple#800080
Demo
rosybrown#bc8f8f
Demo
royalblue#4169e1
Demo
salmon#fa8072
Demo
sandybrown#f4a460
Demo
seagreen#2e8b57
Demo
sienna#a0522d
Demo
skyblue#87ceeb
Demo
slateblue#6a5acd
Demo
steelblue#4682b4
Demo
tan#d2b48c
Demo
thistle#d8bfd8
Demo
tomato#ff6347
Demo
violet#ee82ee
Demo
wheat#f5deb3
Demo
whitesmoke#f5f5f5
Demo
yellow#ffff00
Demo
yellowgreen#9acd32
Demo

HTML5 New Tags (Elements)

The following tags (elements) have been introduced in HTML5:
Tags (Elements)Description
<article>Represents an independent piece of content of a document, such as a blog entry or newspaper article
<aside >Represents a piece of content that is only slightly related to the rest of the page.
<audio>Defines an audio file.
<canvas>This is used for rendering dynamic bitmap graphics on the fly, such as graphs or games.
<command>Represents a command the user can invoke.
<datalist>Together with the a new list attribute for input can be used to make comboboxes
<details>Represents additional information or controls which the user can obtain on demand
<embed>Defines external interactive content or plugin.
<figure>Represents a piece of self-contained flow content, typically referenced as a single unit from the main flow of the document.
<footer>Represents a footer for a section and can contain information about the author, copyright information, et cetera.
<header>Represents a group of introductory or navigational aids.
<hgroup>Represents the header of a section.
<keygen>Represents control for key pair generation.
<mark>Represents a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context.
<meter>Represents a measurement, such as disk usage.
<nav>Represents a section of the document intended for navigation.
<output>Represents some type of output, such as from a calculation done through scripting.
<progress>Represents a completion of a task, such as downloading or when performing a series of expensive operations.
<ruby>Together with <rt> and <rp> allow for marking up ruby annotations.
<section>Represents a generic document or application section
<time>Represents a date and/or time.
<video>Defines a video file.
<wbr>Represents a line break opportunity.

New types for <input> tag:

The input element's type attribute now has the following new values:
TypeDescription
colorColor selector, which could be represented by a wheel or swatch picker
dateSelector for calendar date
datetime-localDate and time display, with no setting or indication for time zones
datetimeFull date and time display, including a time zone.
emailInput type should be an email.
monthSelector for a month within a given year
numberA field containing a numeric value only
rangeNumeric selector within a range of values, typically visualized as a slider
searchTerm to supply to a search engine. For example, the search bar atop a browser.
telInput type should be telephone number.
timeTime indicator and selector, with no time zone information
urlInput type should be URL type.
weekSelector for a week within a given year

HTML5 Deprecated Tags and Attributes

Deprecated Tags:

The following elements are not available in HTML5 anymore and their function is better handled by CSS:
Tags (Elements)Description
<acronym>Defines an acronym
<applet> Defines an applet
<basefont>Defines an base font for the page.
<big>Defines big text
<center>Defines centered text
<dir>Defines a directory list
<font>Defines text font, size, and color
<frame> Defines a frame
<frameset> Defines a set of frames
<isindex> Defines a single-line input field
<noframes>Defines a noframe section
<s> Defines strikethrough text
<strike>Defines strikethrough text
<tt>Defines teletype text
<u> Defines underlined text

Deprecated Attributes:

HTML5 has none of the presentational attributes that were in HTML4 as their functions are better handled by CSS. Some attributes from HTML4 are no longer allowed in HTML5 at all and they have been removed compeletely.
Following is the table having removed attributed and their corresponding impacted tags (elements) ie. elements from which those attributes have been removed permanently:
Removed AttributesFrom the Elements
revlink, a
charset link and a
shape a
coords a
longdesc img and iframe.
target link
nohref area
profile head
version html
name img
scheme meta
archiveobject
classidobject
codebaseobject
codetypeobject
declare object
standby object
valuetype param
type param
axis td and t
abbr td and t
scope td
align caption, iframe, img, input, object, legend, table, hr, div, h1, h2, h3, h4, h5, h6, p, col, colgroup, tbody, td, tfoot, th, thead and tr.
alinkbody
linkbody
vlink body
text body
background body
bgcolor table, tr, td, th and body.
border table and object.
cellpadding table
cellspacing table
char col, colgroup, tbody, td, tfoot, th, thead and tr.
charoff col, colgroup, tbody, td, tfoot, th, thead and tr.
clear br
compact dl, menu, ol and ul.
frame table
compact dl, menu, ol and ul.
frame table
frameborder iframe
hspace img and object.
vspace img and object.
marginheight iframe
marginwidth iframe
noshade hr
nowrap td and th
rules table
scrolling iframe
size hr
type li, ol and ul.
valign col, colgroup, tbody, td, tfoot, th, thead and tr
width hr, table, td, th, col, colgroup and pre.

HTML5 Tags Reference

A complete list of standard tags available in HTML5 is given below. All the tags are ordered alphabetically along with an indication if they have been introduced newly or they have been deprecated in HTML5.
TagDescription
<!--...-->Specifies a comment
<!DOCTYPE> Specifies the document type
<a>Specifies an anchor
<abbr>Specifies an abbreviation
<acronym>Deprecated:Specifies an acronym
<address>Specifies an address element
<applet>Deprecated: Specifies an applet
<area>Specifies an area inside an image map
<article>New Tag: Specifies an independent piece of content of a document, such as a blog entry or newspaper article
<aside>New Tag:Specifies a piece of content that is only slightly related to the rest of the page.
<audio>New Tag:Specifies an audio file.
<base>Specifies a base URL for all the links in a page
<basefont>Deprecated: Specifies a base font
<bdo>Specifies the direction of text display
<bgsound>Specifies the background music
<blink>Specifies a text which blinks
<blockquote>Specifies a long quotation
<body>Specifies the body element
<br>Inserts a single line break
<button>Specifies a push button
<canvas>New Tag:This is used for rendering dynamic bitmap graphics on the fly, such as graphs or games.
<caption>Specifies a table caption
<center>Deprecated: Specifies centered text
<col>Specifies attributes for table columns 
<colgroup>Specifies groups of table columns
<command>New Tag:Specifies a command the user can invoke.
<comment>Puts a comment in the document
<datalist>New Tag:Together with the a new list attribute for input can be used to make comboboxes
<dd>Specifies a definition description
<del>Specifies deleted text
<details>New Tag:Specifies additional information or controls which the user can obtain on demand.
<dir>Deprecated: Specifies a directory list
<div>Specifies a section in a document
<dl>Specifies a definition list
<dt>Specifies a definition term
<embed>New Tag:Defines external interactive content or plugin.
<fieldset>Specifies a fieldset
<figure>New Tag:Specifies a piece of self-contained flow content, typically referenced as a single unit from the main flow of the document.
<b>Specifies bold text
<big>Deprecated:Specifies big text
<i>Specifies italic text
<small>Specifies small text
<tt>Deprecated:Specifies teletype text
<font>Deprecated: Specifies text font, size, and color
<footer>New Tag:Specifies a footer for a section and can contain information about the author, copyright information, et cetera.
<form>Specifies a form 
<frame> Deprecated:Specifies a sub window (a frame)
<frameset>Deprecated:Specifies a set of frames
<head>Specifies information about the document
<header>New Tag:Specifies a group of introductory or navigational aids.
<hgroup>New Tag:Specifies the header of a section.
<h1> to <h6> Specifies header 1 to header 6
<hr> Specifies a horizontal rule
<html>Specifies an html document
<isindex>Deprecated: Specifies a single-line input field
<iframe>Specifies an inline sub window (frame)
<ilayer>Specifies an inline layer
<img>Specifies an image
<input>Specifies an input field
<ins>Specifies inserted text
<keygen>New Tag:Specifies control for key pair generation.
<keygen>Generate key information in a form
<label>Specifies a label for a form control
<layer>Specifies a layer
<legend>Specifies a title in a fieldset
<li>Specifies a list item
<link>Specifies a resource reference
<map>Specifies an image map 
<mark>New Tag:Specifies a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context.
<marquee>Create a scrolling-text marquee
<menu>Deprecated: Specifies a menu list
<meta>Specifies meta information
<meter>New Tag:Specifies a measurement, such as disk usage.
<multicol>Specifies a multicolumn text flow
<nav>New Tag:Specifies a section of the document intended for navigation.
<nobr>No breaks allowed in the enclosed text
<noembed>Specifies content to be presented by browsers that do not support the <embed>tag
<noframes>Deprecated:Specifies a noframe section
<noscript>Specifies a noscript section
<object>Specifies an embedded object
<ol>Specifies an ordered list
<optgroup>Specifies an option group
<option>Specifies an option in a drop-down list
<output>New Tag:Specifies some type of output, such as from a calculation done through scripting.
<p>Specifies a paragraph
<param>Specifies a parameter for an object
<cite>Specifies a citation
<code>Specifies computer code text
<dfn>Specifies a definition term
<em>Specifies emphasized text 
<kbd>Specifies keyboard text
<samp>Specifies sample computer code
<strong>Specifies strong text
<var>Specifies a variable
<plaintext>Deprecated: Render the raminder of the document as preformatted plain text
<pre>Specifies preformatted text
<progress>New Tag:Specifies a completion of a task, such as downloading or when performing a series of expensive operations.
<q>Specifies a short quotation
<ruby>New Tag:Together with <rt> and <rp> allow for marking up ruby annotations.
<script>Specifies a script
<section>New Tag:Represents a generic document or application section.
<select>Specifies a selectable list
<spacer>Specifies a white space
<span>Specifies a section in a document
<s>Deprecated: Specifies strikethrough text
<strike>Deprecated: Specifies strikethrough text
<style>Specifies a style definition
<sub>Specifies subscripted text
<sup>Specifies superscripted text
<table>Specifies a table
<tbody>Specifies a table body
<td>Specifies a table cell
<textarea>Specifies a text area
<tfoot>Specifies a table footer
<th>Specifies a table header
<thead>Specifies a table header
<time>New Tag:Specifies a date and/or time.
<title>Specifies the document title
<tr>Specifies a table row
<u>Deprecated: Specifies underlined text
<ul>Specifies an unordered list
<video>New Tag:Specifies a video file.
<wbr>New Tag:Specifies a line break opportunity.
<wbr>Indicate a potential word break point within a <nobr> section
<xmp>Deprecated: Specifies preformatted text

HTML5 Web Workers

JavaScript was designed to run in a single-threaded environment, meaning multiple scripts cannot run at the same time. Consider a situation where you need to handle UI events, query and process large amounts of API data, and manipulate the DOM.
Javascript will hang your browser in situation where CPU utilization is high. Let us take a simple example where Javascript goes through a big loop:
<!DOCTYPE HTML>
<html>
<head>
<title>Big for loop</title>
  <script>
      function bigLoop(){
         for (var i = 0; i <= 10000000000; i += 1){
            var j = i;
         }
         alert("Completed " + j + "iterations" );
      }
      function sayHello(){
         alert("Hello sir...." );
      }
  </script>
</head>
<body>
   <input type="button" onclick="bigLoop();" value="Big Loop" />
   <input type="button" onclick="sayHello();" value="Say Hello" />
</body>
</html>
Try above example online to see the result - Try online using any browser. When you click Big Loop button it displays following result in Firefox:
Big Loop

What is Web Workers?

The situation explained above can be handled using Web Workers who will do all the computationally expensive tasks without interrupting the user interface and typically run on separate threads.
Web Workers allow for long-running scripts that are not interrupted by scripts that respond to clicks or other user interactions, and allows long tasks to be executed without yielding to keep the page responsive.
Web Workers are background scripts and they are relatively heavy-weight, and are not intended to be used in large numbers. For example, it would be inappropriate to launch one worker for each pixel of a four megapixel image.
When a script is executing inside a Web Worker it cannot access the web page's window object (window.document), which means that Web Workers don't have direct access to the web page and the DOM API. Although Web Workers cannot block the browser UI, they can still consume CPU cycles and make the system less responsive.

How Web Workers Work?

Web Workers are initialized with the URL of a JavaScript file, which contains the code the worker will execute. This code sets event listeners and communicates with the script that spawned it from the main page. Following is the simple syntax:
var worker = new Worker('bigLoop.js');
If the specified javascript file exists, the browser will spawn a new worker thread, which is downloaded asynchronously. If the path to your worker returns an 404, the worker will fail silently.
If your application has multiple supporting javascript files, you can import them importScripts() method which takes file name(s) as argument separated by comma as follows:
importScripts("helper.js", "anotherHelper.js");
Once the Web Worker is spawned, communication between web worker and its parent page is done using the postMessage() method. Depending on your browser/version, postMessage() can accept either a string or JSON object as its single argument.
Message passed by Web Worker is accessed using onmessage event in the main page. Now let us write our bigLoop example using Web Worker. Below is the main page (hello.htm) which will spawn a web worker to execute the loop and to return the final value of variable j:
<!DOCTYPE HTML>
<html>
<head>
<title>Big for loop</title>
  <script>
      var worker = new Worker('bigLoop.js');
      worker.onmessage = function (event) {
        alert("Completed " + event.data + "iterations" );
      };

      function sayHello(){
         alert("Hello sir...." );
      }
  </script>
</head>
<body>
   <input type="button" onclick="sayHello();" value="Say Hello"/>
</body>
</html>
Following is the content of bigLoop.js file. This makes use of postMessage() API to pass the communication back to main page:
for (var i = 0; i <= 1000000000; i += 1){
   var j = i;
}
postMessage(j);
Now let us keep hello.htm and bigLoop.js file in the same directory and try to access hello.htm using latest version of either Safari or Firefox.
Try above example online to see the result - Try online using latest version of either Safari or Firefox.

Stopping Web Workers:

Web Workers don't stop by themselves but the page that started them can stop them by calling terminate() method.
worker.terminate();
A terminated Web Worker will no longer respond to messages or perform any additional computations. You cannot restart a worker; instead, you can create a new worker using the same URL.

Handling Errors:

The following shows an example of an error handling function in a Web Worker JavaScript file that logs errors to the console. With error handling code, above example would become as following:
<!DOCTYPE HTML>
<html>
<head>
<title>Big for loop</title>
  <script>
      var worker = new Worker('bigLoop.js');
      worker.onmessage = function (event) {
        alert("Completed " + event.data + "iterations" );
      };

      worker.onerror = function (event) {
         console.log(event.message, event);
      };

      function sayHello(){
         alert("Hello sir...." );
      }
  </script>
</head>
<body>
   <input type="button" onclick="sayHello();" value="Say Hello"/>
</body>
</html>

Checking for Browser Support:

Following is the syntax to detect a Web Worker feature support available in a browser:
<!DOCTYPE HTML>
<html>
<head>
<title>Big for loop</title>
  <script src="/js/modernizr-1.5.min.js"></script>
  <script>
   if (Modernizr.webworkers) {
      alert("Congratulation!! you have web workers support." );
   }else{
      alert("Sorry!! you do not have web workers support." );
   }
  </script>
</head>
<body>
   <p>Checking for Browser Support for web workers</p>
</body>
</html>