FAQ: Learn HTML - Intro to HTML - Videos

1 Like

Hey there! How can i get a line break between the image and the video? Thanks in advance.

I was about to ask the same Question.
I will be very happy if this question is answered.

if we can display “Video not supported” if the browser cannot upload the video, can we also display it for an image if the browser cannot upload your image?

find a fix? i’m stuck here as well

stuck here. i’ve tried several times. Any ideas? i’ve done steps 2 and 3 and everything works perfectly not sure why it’s still giving me an error " After the <img> element, did you create a <video> element that contains the provided video url?"

Why do you have a <br /> between the image and video?

tried with and without. just to make a space between the picture of video.

I ended up force solving the problem. Everything was exact. It didn’t like some previous code from past lessons. So, unsure of the actual fix.

can you share your fix?

Okay so, is it necessary to add width and height to code our video because i was thinking we can actually just put the src then the controls and we are done with that, because what if i want to copy a video from youtube into my website i obviously wouldn’t know the height and width of the video or what do you guys think :thinking: :man_shrugging: :man_shrugging:

Imagine when you are adjusting the width and height attribute using your laptop, then you decide to display the webpage at a monitor screen with a larger dimension one day to find out that the size of the video layout is not what you see or expect from the smaller screen dimension of a laptop.

That is the drawback of using them. Do resort to responsive media queries if you like, but that would be a PITA to maintain. Also, one would have to constantly monitor the reliability of media queries as adjusting all content to fit one unanimous size requires a tremendous amount of effort.

Hence, the most optimal way of making a video customized to the screen layout is adjust its dimensions using an external video editor. It is also more feasible when it comes to testing whether the video can fit the screen properly and deemed convenient for adjustments in the future.

1 Like

Okay thank you soo much for d reply, so where can i get an external video editor like you said, how do i do this please any recommendations???

A simple query search is much faster than asking here, kudos ! ^^ video size editor - Search

Thanks soo much for the reply

1 Like

As part of this exercise, I wrote these lines of code, but I keep getting error (the suggestion is something along the lines of, “did you add the video tag?”).

What did I do wrong?

 <div id="media">
    <h2>Media</h2>
    <img src="https://content.codecademy.com/courses/web-101/web101-image_brownbear.jpg" alt="A Brown Bear"/><br><br>
    <video src="https://content.codecademy.com/courses/freelance-1/unit-1/lesson-2/htmlcss1-vid_brown-bear.mp4" width="320" height="240" controls>Video not supported</video>
  </div>

Why do you have <br /> between the image and video?

If I remember correctly, the request was to add the video “under the image,” so that’s what I did. I see in the solution that both image and video were next to each other, was that what I did wrong?