Detect Html5 Usage

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.)

3

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.

6

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest