How to add a video link to your code from youtube?

I typed my code and tried to add a youtube link in the video tag. but it only shows up like this mkk

First do the reading on embedded video in webpages and learn all the things that can go wrong and how to write in fallback procedures for when they do.

Can you send what code you are using if you are still having this problem so we can at least see what you are doing? and also I would recommend having the video you want to play just saved inside a directory in your website. I do not believe you would be getting the views from the video from people watching on your website regardless but then again I do not know YouTube’s algorithm.

That would only apply if you owned the video. If a video from another site is sharable by way of embedding, then that is the way to do it. Scraping someone’s video and mounting it on your site is a good way to get your site taken down with a cease and desist order from the owner of the video. You could also find yourself in court on copyright infringement charges or theft of intellectual property. No small matter.

I learnt about the video tag from the exercise 15 of the Introduction to HTML course.
Following the instructions, I used this code for the video link:
However, the link in exercise works perfectly fine.

What should I do to add a video from youtube or any other source online? And why is this not working?

As mentioned earlier, one should read up on all the ins and outs of embedding video, including support for multiple formats, HTML5 versus Flash (which is still a fallback) and how to write accessible markup. Be sure that you read YouTube’s Terms and Conditions and follow their guidelines. Don’t expect that everyone will want their video shared on your site. Videos are not the property of YouTube, but of the account holder who posts it. Clear it with them before using their intellectual property.

Check the HTML5Rocks site, and any others that look official such as W3C, MDN, etc.

As long as you make it clear that you are not in ownership of the video and link it still there shouldnt be an issue especially if it was meant to be shared in the first place. And I guess before I was thinking more on the matter of him making the youtube video as like an advertisement for his site or advertising what his site is for. My mistake for partially misguiding.

For more:

Which the owner will make perfectly clear when that is their intention. Just linking back to the source does not absolve us of responsibility. Never assume.