Detect Html5 Usage
Is It Possible to Check If a Website Uses Html5 Elements (And Which Ones)? for Example I Know Youtube Uses the Element, but Does It Use Some Other Elements as...
Is it possible to check if a website uses HTML5 elements (and which ones)?
For example I know Youtube uses the <video> element, but does it use some other elements as well?
I've tried reading the source to spot new elements but it's a hard task.
(I posted this on Super User because it's not really programming related. More a use of websites that do this (like validators) or plugins.)
1 Answer
If you want to see if a website is using HTML5 elements, you only need to view the source of the website.
If the source code starts with the following declaration:
<!DOCTYPE HTML>
you're onto a HTML5 marked up website.
Also, it may be using some new elements introduced:
<article>
<aside>
<audio>
<canvas>
<command>
<datagrid>
<details>
<dialog>
<figure>
<footer>
<header>
<m>
<meter>
<nav>
<output>
<progress>
<section>
<source>
<time>
<video>
Here's a peek at the source code on a Youtube page running the <video> element:
Seen through the Inspect element right-click option in Google Chrome, you'll note the declaration at the top is <!DOCTYPE HTML> specifying the use of HTML5 elements on the page.