# Saturday, December 7, 2013

The <input> tag has been around a long time and supports a number of values for the “type” attribute (“text”, “checkbox”, “hidden”, etc.) HTML5 adds a number of new allowed values to the input type attribute. These are designed to capture specific types of input data. Allowed values are

  • color
  • date
  • datetime
  • datetime-local
  • email
  • month
  • number
  • range
  • search
  • tel
  • time
  • url
  • week

For example, if you want the user to enter a color value, use the following markup:

<input type="color" name="MyColor">

In Chrome, this markup renders a button that, when clicked, displays the following popup, allowing users to select the color of their choice.


Some browsers render different controls for these input types. For example, Chrome renders a popup calendar for the date type and a color picker for the color type. Browsers that don’t support custom controls simply render a textbox.

Even if no special control is rendered, the behavior of these objects is affected by the type value. Two properties – valid and invalid – were added to input tags in HTML5 and these property values change depending on the input type value and the data entered by the user. For example, if a user attempts to enter text into a <input type=“number”> control, the valid property will be set to false and the invalid property will be set to true. You can access this property either through JavaScript or through CSS, which is a good way to provide visual cues that a user has not correctly completed a form.

The new Input types are a great way to make it easier for users to input data into your forms; to restrict user input based on the expected data use; and to validate form input.

HTML5 | Web
Saturday, December 7, 2013 9:06:00 PM (GMT Standard Time, UTC+00:00)
# Friday, December 6, 2013

Two of my favourite new attributes to input tags are “autofocus” and “placeholder”.


The “autofocus” attribute causes the cursor to advance to a control when the page loads. This serves as a great convenience to the user, who can begin entering data into a form immediately. Previously, I would write JavaScript to accomplish this. Obviously, you should have only one “autofocus” attribute on a page. Below is an example:

<input type="text" 
    autofocus  />


The “placeholder” attribute displays text within a control without modifying the value of that control. Placeholder text disappears when a user starts typing in an input control. This is useful for offering helpful advice about what to enter in a textbox. Below is an example of an INPUT tag with the PLACEHOLDER attribute set.

<input type="text" 
    placeholder="Enter First Name"  />

In Internet Explorer 11, the markup above renders like the image below:


In some browsers (such as IE 11), the placeholder text disappears as soon as the user selects the input element; in other browsers, the text remains until the user begins typing.

In all cases, the placeholder text is never submitted with the form values. It is only for display.


In this article, we reviewed how to use two new attributes introduced in HTML 5.

HTML5 | Web
Friday, December 6, 2013 8:55:00 PM (GMT Standard Time, UTC+00:00)
# Thursday, December 5, 2013

HTML5 introduced a few new tags to the markup language. Below is a partial list of these tags:

  • article
  • aside
  • audio
  • canvas
  • command
  • datalist
  • details
  • embed
  • figure
  • figcaption
  • footer
  • header
  • hgroup
  • keygen
  • mark
  • meter
  • nav
  • output
  • progress
  • rp
  • rt
  • section
  • source
  • summary
  • time
  • video
  • wbr

Let’s look at a few of these new tags.


The Footer, Header, Article, and Aside tags do not affect the page rendering. Instead, they are used to organize the content of a page, making it clear which parts belong together.

The Header and Footer tags should contain summary information about the page and the site. These typically belong at the top and bottom of a page, but you will need to add styling to make this happen.

The Article tag is for a blog or newspaper-style site that contains multiple, distinct stories or articles. Enclose each story with the Article tag to distinguish it from other stories on the page. Within each article, you can specify a quote from that article or HTML that relates to that article. Do so by surrounding this HTML with the Aside tag. An example is shown below.

    <h1>Breaking News</h1>
    <p>The quick brown fox jumps over the lazy dog</p>
        <h1>Side Note</h1>
        <p>Oh, by the way</p>

These tags are examples of semantic markup, which was discussed in Part 1 of this series.


The <figure> tag is designed to enclose a picture, diagram, code-listing, or other content that stands apart from the body of a document.

The <figcaption> tag is contained within a <figure> tag and contains a caption to describe that figure. There should be at most one figcaption for each figure.

The sample below:

    <img src="babelfish.png"> 
        The mysterious babelfish

would render something like below:



When a browser is resized or when a web page is viewed at different resolutions, by default, the text on the page wraps to accommodate the new boundaries. Sometimes, this wrapping can make the text look awkward, particular when a long word is involved. The <wbr> tag can help this by splitting a word at the appropriate point.

The <wbr> tag should be inserted in the middle of a long word to indicate where it should be broken, in case it needs to move to a new line.


In the past, the only way to render multimedia in a browser was to use a plug-in, such as Flash or Silverlight. With HTML5, we now have the <audio> and <video> tags to play multimedia files natively, without the need for an external plug-in.

We can identify the media source using the src attribute in the following example:

<video src=”MyVideo.avi> 

or we can identify multiple video sources by enclosing <source> tags within an <audio> or <video> tag, as in this example:

    <source src="yyy.mp4" />
    <source src="yyy.ogv" />
    <source src="yyy.webm" />

Supplying multiple media formats is advised if you want your media file to play on multiple platforms. Since there is no universal audio or video format for all platforms, it’s a good idea to encode your multimedia files into different formats for different clients. The browser will try each format in order until it finds a supported one.

Some other useful attributes of the audio and video tags are

  • controls - When present, this attribute adds a set of controls on the page, allowing the user to start, pause, and change volume. This attribute needs no value.
  • loop - When present, this attribute causes the media file to replay after it finishes. This attribute needs no value.
HTML5 | Web
Thursday, December 5, 2013 9:40:00 PM (GMT Standard Time, UTC+00:00)
# Wednesday, December 4, 2013


When I think of HTML5, I’m reminded of a quote about space by one of my favourite authors –Douglas Adams. “Space,” says Adams, “is big. Really big. I mean, you may think it’s a long way down to the chemist’s but that’s just peanuts to space.” And the reason this quote reminds me of HTML5 is because HTML 5 is big. Really big. I mean you may think it’s a long way… Well, you get the idea.

The point is that HTML5 is not just one thing. HTML5 is new tags and new attribute to existing tags and new allowed values for existing attributes and new rules about tags and attributes; It’s also a rich set of new JavaScript APIs to enhance your applications; In addition, a new version of Cascading Style Sheets (CSS3) , while not technically part of HTML5, was released at the same time also by the W3C, so we often discuss CSS3 along with HTML5 and I will do so in this paper.

HTML5 is a set of guidelines released by the World Wide Web Consortium (the “W3C” for short) with input from the most popular browser manufacturers, such as Microsoft, Google, the Mozilla Foundation, and Apple.

The browser manufacturers are implementing the HTML5 guidelines at their own pace and in their own order. Due to the enormous scope of HTML5 and the rate at which users tend to upgrade to new browsers, it is unlikely that HTML5 will be on all computers for another decade. Does this mean that HTML5 is irrelevant today? Of course not! Each browser manufacturer is working furiously to implement new features into their browser and encouraging users to upgrade to the latest browser.

You as a developer can start taking advantages of these features today. The challenge, of course, is to build a web application that will use features of new browsers, but still be useable if a user connects with an older browser that does not support the new features. This backwards compatibility is known as “graceful degradation”, meaning that your application downgrades itself gracefully rather than crashing when it encounters a degraded browser. We will talk about ways of making your pages and applications degrade gracefully throughout this paper.


The W3C had several goals when defining HTML5, including Simplicity, Semantic Markup, and ???


HTML5 is simpler than earlier versions of HTML. For example, the mysterious document declaration at the top of each HTML document has been simplified from

    "-//W3C//DTD XHTML 1.0 Transitional//EN" 


<!DOCTYPE html>

This new version is simple enough that we actually have a prayer of memorizing it.

The <LINK> and <SCRIPT> tag have been simplified. When was the last time you linked to a stylesheet that was not a CSS stylesheet or added client-side script in a language other than JavaScript? I suspect  attributes and assume every LINK tag points to a CSS stylesheet and every SCRIPT refers to JavaScript? That is what the new HTML5 standard does.

Old New
<link type="text-css" rel="stylesheet" href="MyStyle.css"> <link rel="stylesheet" href="MyStyle.css">
<script type="text/javascript" src="Myscript.js"> <script src="Myscript.js">


Semantic markup refers to markup that provides meaning to the text it surrounds – meaning beyond simply show to display that text in a browser. This is an important concept as the web evolves from its original goal of a way to store, link, and share documents and pictures of cats.

Semantic markup existed to a lesser extent in earlier versions of HTML. For example, the tags <i> and <em> do the same thing visually when surrounding text: They tilt the top of each letter to the right. However, the <em> tag has some semantic meaning beyond simply telling the browser how to display text. The <em> tag indicates that the reason to italicize the text – With the <em> tag, the marked-up text is italicized to indicate that this text should be emphasized. When one reads the text aloud, one’s voice should rise a little louder or higher to indicate this emphasis. A similar case can be made for the tags <b> and <strong>.

HTML5 | Web
Wednesday, December 4, 2013 9:02:00 PM (GMT Standard Time, UTC+00:00)
# Tuesday, December 3, 2013

If you have written an app for Windows 8 or Windows Phone 8 or if you are about to write an app, you have a chance to win a lot of money.

Modev is sponsoring a contest with $10,000 in prizes!

Some prizes are determined by a panel of judges and some by public voting. Prizes are broken out as follows:

  Judges’ Vote Public Vote
1st Place $2,500 $2,500
2nd Place $1,500 $1,500
3rd Place $1,000 $1,000

In order to qualify, you must complete and submit a new app by December 20, 2013 (I know! I just heard about this myself) and have it approved and in the store by December 31.

Not only is this a chance to win some extra cash, it is also a good way to promote your app.

You can read about the contest here and you can submit your app here!

If you are looking for a reason to finish that app, a chance at free money is a pretty good one.


Tuesday, December 3, 2013 9:20:02 PM (GMT Standard Time, UTC+00:00)

This week's app is actually 3 apps. And they are more than apps - they 3 short stories and novels with a reader included. Each story was written by Stephen Donald Huff, PhD and each was published by Capital Ideations LLC. 

The apps/books are all free and each is a science fiction story. I read only the sort story "A Paradox of Distance" but I liked Dr. Huff's style and I plan to read the other two. You can download the apps at the links below:

If you have written or know of a Windows 8 app you would like to see featured here, please contact me at dgiard@microsoft.com.

Tuesday, December 3, 2013 4:21:00 PM (GMT Standard Time, UTC+00:00)
# Monday, December 2, 2013
Monday, December 2, 2013 3:05:34 PM (GMT Standard Time, UTC+00:00)
This post is for the Great Lakes Area .NET User Group (MIGANG). Download and rate each of the Windows 8 apps listed below to help MIGANG win fabulous prizes, including an Xbox One!



Baby Needs for Girls


The URUS fan app


Bo Burnham Fan Club


Nerdist Fan Club


Basketball Pop


Celebrity Memory Match


Halloween Match


Switching Stick Figures




Barnyard Bash


Jump Squirrel, Jump!


Protect the Dragons 2


Spring Sting


Sunny Summer


Whimsical Winter


Shape Sifter


BCBSWNY for Windows 8


Tennis Elbow HD FREE


Fly or Die


Picture Memory


Monday, December 2, 2013 12:51:00 AM (GMT Standard Time, UTC+00:00)
# Sunday, December 1, 2013

This post is for the Chicago .NET User Group. Download and rate each of the Windows 8 apps listed below to help CNUG win fabulous prizes, including an Xbox One!

Courier and Press http://apps.microsoft.com/windows/en-us/app/F7926F57-F5E4-4B80-9DE4-83AE596C1A1D
Kitsap Sun http://apps.microsoft.com/windows/en-us/app/F973832F-4D16-4F66-BF06-CFFE5CC60A66
Naples Daily News http://apps.microsoft.com/windows/en-us/app/21CA1C4E-B0E7-40F9-BE51-347133A5C7A0
Record Searchlight http://apps.microsoft.com/windows/en-us/app/97F30C2B-DE68-4904-BCE8-0D3E442F3F6A
San Angelo Standard-Times http://apps.microsoft.com/windows/en-us/app/1F9917D4-1146-4624-AAD2-6E583C17B63C
TCPalm/Treasure Coast Newspapers http://apps.microsoft.com/windows/en-us/app/2536D67B-23ED-4C98-B7C2-EF8289CB0FDE
Times Record News http://apps.microsoft.com/windows/en-us/app/E5ADDF04-2D96-405D-97BC-D793F1F8F6E3
Ventura County Star http://apps.microsoft.com/windows/en-us/app/EF075C20-BB6B-46D6-A810-07FEA0B18646
Dutch Spell Check http://apps.microsoft.com/windows/en-us/app/944C633B-EED1-4D25-AF08-410B92ECCBA4
Teacher Pay (CA) http://apps.microsoft.com/windows/en-us/app/12AF4C07-3007-45DB-8E7E-277C869EBD87
Miami Weather http://apps.microsoft.com/windows/en-us/app/D6656C13-DB73-4B3D-94E3-1EFC5C14036D
New York Weather and Image http://apps.microsoft.com/windows/en-us/app/A018275D-5BC5-4600-ACEA-0B9D4D59AF6F
A Rainy June and Other Stories Ebook http://apps.microsoft.com/windows/en-us/app/49CE8EAA-8D60-43CB-B032-A2E3D01E9A52
Bingo Call Simulator http://apps.microsoft.com/windows/en-us/app/F3D59EEE-4EE0-46F0-B008-7D84AA666267
Coins Flip Simulator http://apps.microsoft.com/windows/en-us/app/7D6E4ECB-A679-4C81-9D4D-CBA43BED2BB7
Custom RPG Battles http://apps.microsoft.com/windows/en-us/app/DDAE76B4-4F33-4E70-B82D-DC5F30015780
Dead Pixels Search http://apps.microsoft.com/windows/en-us/app/087FE823-9DD3-4A71-8CF8-D33AD6CE5058
Fact About Cat http://apps.microsoft.com/windows/en-us/app/9B7B7F6E-364C-4D2A-92D8-9616F37FB2A3
Headphone Directional Test http://apps.microsoft.com/windows/en-us/app/D20B8504-35AE-4CDC-8036-AA6FFDD610AA
Jumbled Image - Fire Emblem http://apps.microsoft.com/windows/en-us/app/5B75E954-F72A-4091-BECD-9E6EBB225150
Jumbled Image - F-Zero http://apps.microsoft.com/windows/en-us/app/96441A68-E765-4384-91D0-043208203E32
Tarpan http://apps.microsoft.com/windows/en-us/app/8B7F3DA6-7E95-47EA-BB83-FA5034138F6A
Complete and Absolute total Cost Calculator http://apps.microsoft.com/windows/en-us/app/B0EB3EAA-04BE-4CA1-B2C8-88F254C1722E
La Gran Sabana http://apps.microsoft.com/windows/en-us/app/7727A62F-18B8-4C4E-AE0D-D30F242AD950
Garry Goat Eats a Can http://apps.microsoft.com/windows/en-us/app/0F690D6D-FD9F-4783-ABF9-A9C6EEBBC5A6
Sunday, December 1, 2013 8:58:00 PM (GMT Standard Time, UTC+00:00)
# Friday, November 29, 2013
Back To Basics

A cascading style sheet (CSS) is used to apply styling to an HTML web page. Separating styling from markup provides cleaner markup, easier reuse of styles, and greater flexibility when maintaining a web page.

This article describes the basics of using CSS to applying styles to a web page.

Cascading style sheets are applied to a web page by either enclosing CSS syntax between a beginning and ending STYLE tag or by creating a separate file (typically with a “.CSS” extension) containing CSS syntax and linking that file to the web page, via the LINK tag. The two syntaxes are shown below:

Inline CSS:

selector {
     style-name: style-value;
tag {
     style-name: style-value;
#id {
     style-name: style-value;
.classname {
     style-name: style-value;

Link to stylesheet

<LINK REL=StyleSheet  HREF="style.css" TYPE="text/css">

The CSS syntax consists of a set of selectors, followed by curly brackets (“{” and “}”), containing a set of stylename:stylevalue pairs. For example, in the example below:

div {
     background-color: yellow;

The selector is the word “div”. It tells the style sheet to select all div tags on the page and apply the corresponding style (in this case, yellow background color) to each div.

Historically, the most common type of selectors are

  • Text, to identify a tag name and select all tags of that type (e.g., “div”)
  • Text, preceded by “#”, to identify any element on the page with a given ID (e.g., “#Div1”, which selects any element with the attribute id=“Div1”.)
  • Text, preceded by “.”, to identify any elements on the page with a given class applied to them (e.g., “.Class1”, which selects any element with the attribute class= “Class1”).

Examples of each are below:

Select by Tag


<style> div
background-color: yellow;
} </style>

HTML Markup:

<div>Life, the Universe</div>
<div>and Everything!</div>



Select by ID


<style> #MyDiv
background-color: green;
} </style>

HTML Markup:

<div id="MyDiv">Life, the Universe</div>
<div id="YourDiv">and Everything!</div>



Select by Class name


    background-color: purple;

HTML Markup:

<div>Life, the Universe</div>
<div class="CoolDiv">and Everything!</div>



Friday, November 29, 2013 8:28:00 PM (GMT Standard Time, UTC+00:00)