3

I just started a new job and during my lunch brake I wanted to work on practicing some skills to prep for the MS 70-480 specialist exam. I prefer using Google Chrome, but the company has rules about installing software for personal use so I am stuck working on IE (version:11.0.9600.18015).

So in notepad++ I created the simple test for HTML5's video element.

<!DOCTYPE html>
<html>
<head>
  <title>70-480 Test Page</title>
</head>

<body>
<header>
  <h1>Practice makes perfect</h1>
</header>
  <section id="sandbox">
    <video width="400" controls="">
      <source src="http://www.w3schools.com/html/mov_bbb.mp4" >
      Your browser does not support the video element.
    </video>
  </section>
</body>
</html>

But the page came back without the video showing. I checked the Developer tools and found in the DOM Explorer elements native to the HTML5 (header, video, section, etc.) are not being recognized and instead are showing such as:

...
<body>
  <header></header>
    <h1>Practice makes perfect</h1>
  </header><//header>
  <section id="sandbox"></section>
    <video controls="" width="400"></video>
      <source src="http://www/w3schools.com/html/mov_bbb.mp4"></source>
    </video><//video>
  </section><//section>
</body>
....

I know IE11 supports the elements since when I copy my code to JSfiddle on that same browser it shows up fine. Is there an explanation for why Internet explorer is giving me this head ache?

Steven Biggs
  • 61
  • 1
  • 1
  • 6
  • can you try changing to and see if it works – Satya Sep 15 '15 at 14:27
  • Does your browser have the "Edge (default)" document mode set? Try this tag inside the header – pedromendessk Sep 15 '15 at 14:34
  • Tryied the solution in a plain html file on my computer locally, doesn't seems to do anything when adding this meta tag @PedroMendes, I have a black square but video seems not to be recognized. I have the controls, but clicking on `play` doesn't run the video. – Anwar Sep 15 '15 at 14:42
  • 1
    **Edit** the issue seems to come from security level of the browser. Everything run well, did you checked the message box in the footer of the page asking if you want to run the script of the page ? – Anwar Sep 15 '15 at 14:49
  • Your page is likely being loaded in compatibility view. Please see this [previous answer](http://stackoverflow.com/questions/27272454/ie11-document-mode-defaults-to-ie7-how-to-reset/27278277#27278277) for more info. – Lance Leonard Sep 15 '15 at 18:10
  • Wow! I thought I had told stack overflow to email me when I got a response, so this was a surprise when I happened to check back! As for the answer Pedro Mendes and Lance Leonard's methods both worked. Thank you both! – Steven Biggs Sep 16 '15 at 13:41

1 Answers1

3

Both Pedro Mendes and Lance Leonard's comments worked.

Pedro's solution:

Does your browser have the "Edge (default)" document mode set? Try this tag inside the header

Lance's solution:

Your page is likely being loaded in compatibility view. Please see this previous answer for more info.

I decided to go with Lance's solution so that if I make more pages in the future I won't have to include the meta tag every time.

Community
  • 1
  • 1
Steven Biggs
  • 61
  • 1
  • 1
  • 6