If you find this helpful, please click the Google |


Detecting HTML 5 is as easy as 1-2-3
To test support for HTML 5 and display different messages based on whether HTML 5 support is available, try this:
- Create a sample web page. Include a paragraph with a message indicating that HTML 5 is not supported. In the starting <p> tag, include a
class
attribute with"nohtml"
. See the example below. - Create a style sheet with a template to suppress any HTML tags that have the
class="nohtml"
attribute. See the style sheet included with the example. - Include a xml-stylesheet instruction that references the style sheet.