# JSF 2.2 HTML5 Sample

This sample application demonstrates how HTML5 elements and attributes can be used with JSF 2.2.
In JSF 2.2, HTML5 elements can be integrated using the Passthrough Elements feature.
New HTML5 attributes can be integrated using the Passthrough Attributes feature.

### Passthrough Elements

This feature allows you to integrate plain HTML5 element markup into a JSF view. This means that
those elements will exist as components in the JSF view. The jsf namespace when used with
an element attribute indicates to the JSF runtime to produce this as a JSF component in the view.
For example:
<output jsf:id="myoutput" name="myoutput">Example Output</output>
This would also allow you to attach JSF Ajax behavior to the element markup in your pages.

### Passthrough Attributes

HTML5 introduced new types and attributes to existing HTML elements. The Passthrough Elements
feature allows you to have these types and attributes rendered as standard JSF markup is rendered.
The p namespace when used with the attribute tells the JSF runtime to render the attribute as is.
For example:
<h:inputText id="name" p:placeholder="John Doe"</h:inputText>

### The Sample

The sample consists of 2 pages in addition to this one:

- reservation.xhtml
- confirmation.xhtml

The markup on these pages illustrate both of the techniques described.

It is recommended that you use Chrome browser when running this sample as that has the best support
for the HTML5 elements and attributes used here. There are a number of resources available
(such as html5test.com) for determining broser support for HTML5.