NYC Blog Project - use of <video> vs. <embed> - step #17

Hi there,
I am mimicking the NYC Blog (with a different city) as suggested by the hint in step #17 of said project.

When creating my Paris Blog, why does this work?:

<embed controls src="https://www.youtube.com/embed/cC21o8vnbC4" />

…but the following does not work?:

<video controls src="https://www.youtube.com/embed/cC21o8vnbC4">Video not supported.
        </video>

Am I correct in assuming that theoretically any given video that successfully shows up on screen with correctly coded elements containing embed tags should also show up with correctly coded elements containing video tags and vice versa?
(I am aware I probably have a mistake somewhere but I’d like to know if that general assumption holds true.)

Also, if it’s correctly coded but not supported by codecademy the “Video not supported” message would in fact show on screen, correct? (Big “if” :blush: )

Thank you, (this is my very first codecademy question so any feedback on just about anything regarding this post is well-received. I take pleasure in constructive criticism and insight. :wink:)

https://www.codecademy.com/journeys/front-end-engineer/paths/fecj-22-web-development-foundations/tracks/fecj-22-fundamentals-of-html/modules/wdcp-22-semantic-html-38467536-d812-4647-80e0-a05f07a5dd63/projects/semantic-html-nyc-blog

So, I have done some resarch, and finally I asked ChatGPT. So the problem here is that the video element does not work in this case because it needs some APIs or other support in case you would like to use a Youtube video, while the embe tag is perfectly working because it just embed an external video like if it was streaming what Youtube is in reality playing. I don’t know if i’ve been clear, I’m also learning now and english is not my first langauge, let me know.

1 Like

I think a key distinction is that you do not own the hosting for the video you’re linking to. If you were hosting it yourself, this would be no problem.

So when you use iframe or embed (iframe is in the google documentation) you are actually showing a different webpage (which is not what the video tag does) <iframe>: The Inline Frame element - HTML: HyperText Markup Language | MDN

You can also read documentation:

3 Likes

Your English is great! You make perfect sense.
Thanks for the prompt reply! :+1:

1 Like

I appreciate the links. The provided docs are helpful.
Thanks a lot! :slightly_smiling_face:

Thank you, always happy to help