HTML video element 8/13


#1

html video element. my video flashes on and off.
how should the coding script look so far?

can a instructor look at my coding pls. I was going well until I tried to do instruction 2. where I am creating a video element using the code previously as a guide.

I have been cutting and pasting. now I am completely lost.

i can move on forward with the lessons but my video cannot be played.
I worry that the final product will not work at all.


#2

Hi Sistercode,

It looks like this topic is in the wrong category, so we aren't able to tell which lesson (or project) you're on. Could you please post a link to the thing you're working on?
Thanks :slight_smile:


#3

https://www.codecademy.com/pt-BR/courses/make-a-website/lessons/site-structure/exercises/add-video

Thankyou for helping me out here.


#4

@sistercode Thanks!
My code for the video looks like this:

<video controls width="500px" height="auto">
  <source src="https://s3.amazonaws.com/codecademy-content/projects/make-a-website/lesson-1/ollie.mp4" type="video/mp4">
</video>

Would you mind copy/pasting your entire index.html code into here so I can take a look at it?


#5

><!DOCTYPE html>
<html>
<head>
  <title>Ollie Bike Sharing</title>
  <meta charset="utf-8"/>
  <link rel="stylesheet" type="text/css" href="main.css">
</head>
<body>
  <h2>Ollie</h2> 
  </body>
  <ul>
    <li>sign up</li>
    <li>search bikes</li>
    <li>reserve a bike</li>
    <li>about us</li>
    </ul>
  
  
  
  
  
  <h1>Ollie Bike Sharing</h1>
  <h3>Share Your Pedals with the World.</h3>
  <p>Need a set of wheels while you're in town? Use Ollie to pair your perfect vacation with a stylish, affordable bike rental.</p>
   Here is a <a href="cities.html">list</a> of cities where you can find us.
  <video width="320" height="240" controls>
  <source src="https://s3.amazonaws.com/codecademy-content/projects/make-a-website/lesson-1/ollie.mp4"       type="ollie.mp4">
  </video>
          
 

 </html>

#6

@sistercode OK, so first you need to remove the stray > at the very beginning of line 1.

Then, move the </body> on line 10 down to just before </html>, at the bottom of your code.

Next, you'll need to change the type attribute on your <video> - ollie.mp4 simply specifies the name, whereas we want to tell the computer what video encoding method was used for it. So you should change that to video/mp4 instead, like this:

... type="video/mp4">

:slight_smile:

Please let me know if you're still having problems with the lesson!


Also, see this article for how to make your code show up in the forums please:


#7

I'm glad I stumbled on to you. Now I'll have another go at this.

Desrae


#8

A post was split to a new topic: 8. I got the same problem, can you please help me?


#9

A post was split to a new topic: 8. I got the same problem, can you please help me?


#10