There is an excellent script that will let you programmatically determine the current browsers capabilities with HTML5 and CSS3. The script is Modernizer. It will detect capabilities for:
- @font-face
- Canvas
- Canvas Text
- HTML5 Audio
- HTML5 Video
- rgba()
- hsla()
- border-image:
- border-radius:
- box-shadow:
- Multiple backgrounds
- opacity:
- CSS Animations
- CSS Columns
- CSS Gradients
- CSS Reflections
- CSS 2D Transforms
- CSS 3D Transforms
- CSS Transitions
- Geolocation API
- Input Types (some)
The website Find Me By IP has a great implementation of the script.