Several ways to insert video in HTML

A website on the Internet is a means of promoting a service or item. But what kind of web resource without media content? Almost every site has videos that explain, attract, interest. Therefore, the owner of the web resource seeks to learn how to insert video into HTML.

how to insert video in html

Ways to create sites

So, web sites - the ability to present information online. As you know, Internet resources consist of pages that are interconnected by hyperlinks. How can I create my own website?

  1. Use blogging technology. What does it mean? Register on the site and get a second level domain name. Thanks to this opportunity, the site owner becomes the administration of his resource and gets access to a special panel. With it, you can transform the "brainchild" to your liking.
  2. Take advantage of the numerous website designers, like ucoz.ru, jimdo.com, setup.ru, Wix.com, A5.ru, Fo.ru, rusedu.net, etc.
  3. Develop an online resource through CMS, i.e. content management system.
  4. Design your own design "brainchild" and recreate it through the programming language HTML.

However, today it is almost impossible to create a fully functioning HTML website, but, knowing this language, the markup of a web page can be corrected and changed the structure in ready-made templates.

Components of web technology

The web technology is divided into the following basic components:

  1. Computer networks of various kinds interact with one another via TCP / IP.
  2. The Web has become one of the Internet applications that are designed for mass distribution of a variety of information.
  3. In web technology, data carriers are pages that contain media content (graphics, video, hyperlinks), so you need to know how to insert video into HTML.
  4. To transmit hypertext information, the web technology uses the HTTP protocol.
  5. HTML hypertext markup language is used to design and create web pages.
  6. To view resources on the Internet, you need to use a browser.

Method # 1. Insert media content (video) via HTML5 tags

There are several ways to insert video content into a web page. There are three options: insertion via HTML, player or YouTube. First you need to create a regular HTML5 file, which will contain page styles and several subtitles. After preparation, you can choose one of the methods and enjoy the result.

  1. Find the third header and write the code directly below it:insert video using html 5
  2. Open the page in the browser and make sure that the video appears.
  3. Be sure to correctly register the path to the roller.
  4. To embed video in HTML was literate, you need to mark the video control panel. The parameter controls is responsible for this.

It should be noted that this method is not remarkable for everyone. For example, in the Opera browser, videos placed in this way will not be played. To avoid this situation, you need to convert the video into Ogg Theora type, change the code.

You can convert the file through the online-convert.com service. Then you need to change the code to this:

insert video in html

If the old browser does not understand a tag, then the code might look like this.

insert video using html 5

Method # 2. How to insert video in HTML using the player

Video content can be inserted into HTML without any premature upload to video service. So, you can use the script player to put the desired video on the site with the extension .mp4 or .flv. First of all, you need to choose the video itself. Then you need to choose one of the many free players. Alternatively, you can use Flowplayer.

  1. You need to download the files of the specified player to the local computer.
  2. Unzip them to a specific folder on the created site.
  3. Open the HTML file and connect the javascript file of the player to the prepared file. To do this, you need to register a special code inside the HEAD tag. It's important: correctly specify the path to the folder!insert video through player
  4. You need to place the player in the HTML file. Here you need to correctly set the path to the files. There are also settings that prohibit video from launching automatically. If you want the video to start “automatically,” you should remove the comma after the file path, close the bracket (round) and put a semicolon.add video to html

This method is quite simple and straightforward to add video to HTML. By the way, many web programmers use this option.

Method # 3. Insert video in HTML from YouTube

After creating the preparatory HTML5 file, you can begin to insert video content from the YouTube service.

  1. First you need to select a video that will be on the page. It should be stored on the local computer.
  2. You need to go to the website youtube.com. You must create your account or enter an existing one.
  3. After logging in to your page on YouTube, you need to click the "Add Video" button, after which a window will pop up asking you to select a file to upload. The selected video will load after a while.
  4. You can follow the link of the downloaded file, which is located at the top.
  5. To get the code to insert the video, you need to click "Share" and "HTML-code." The page will display the program code that is needed. Here you can specify the following parameters, such as: privacy mode, video size, the ability to show similar records.
  6. After setting the parameters, the code is copied and pasted into the prepared HTML file.
  7. All is ready. Now I understand how to insert video into HTML from the YouTube service.

insert video in html from YouTube

So, several ways to insert a video into HTML were considered. Which option to choose is up to the web programmer or site owner.

How to add youtube video to the site. Secrets, subtleties and tricks insert video clips on the site


How to make your own video player on html5. html5 tag video. HTML5 For beginners. Lesson #12


Print Friendly, PDF & Email
Loading ...

Add a comment

Your e-mail will not be published. Required fields are marked *