ComputersSecurity

How to insert a video in HTML

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

Ways to create sites

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

  1. Use the technology of blogging. 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 the help of it, you can transform the "brainchild" to your liking.
  2. Take advantage of the developed numerous site designers, such as ucoz.ru, jimdo.com, setup.ru, Wix.com, A5.ru, Fo.ru, rusedu.net, and so on.
  3. Develop an Internet resource through CMS, that is, a site management system.
  4. Design your own design of the "brainchild" and recreate it using the HTML programming language.

However, today it is almost impossible to create a fully functioning HTML website, but knowing this language, web page layouts can be adjusted, you can change the structure in ready-made templates.

Components of the web technology part

Web technology is divided into the following basic components:

  1. Different kinds of computer networks interact with each other via the TCP / IP protocol.
  2. The Web has become one of the Internet applications that are intended for the mass dissemination 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 the video into HTML.
  4. To transfer hypertext information, the web technology uses the HTTP protocol.
  5. To design and create web pages, the HTML hypertext markup language is used.
  6. To view resources on the Internet, you need to use the browser.

Method # 1: Inserting media content (video) using HTML5 tags

There are several ways to insert video content onto a web page. There are three options: insert through HTML, player or YouTube. To begin with, you need to create a regular HTML5 file that will contain the page styles and several subheadings. 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:
  2. Open the page in the browser and make sure the video appears.
  3. Be sure to correctly set the path to the clip.
  4. To insert a video in HTML was literate, you need to mark out the video control panel. The controls parameter is responsible for this.

It should be noted that this method is not noticeable for everyone. For example, in the Opera browser, the video 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:

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

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

Video content can be inserted into HTML without any premature upload to the video service. So, you can use the player's script to put the desired movie on a site with the extension .mp4 or .flv. First of all, you need to choose the movie 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 site being created.
  3. Open the HTML file and connect the player's javascript file to the prepared file. To do this, you need to write a special code inside the HEAD tag. Important : correctly specify the path to the folder!
  4. You need to place the player in an HTML file. Here you need to correctly assign the path to the files. Immediately specify the settings that prohibit the video from starting automatically. If you want the video to start "automatic", you should remove the comma after the file path, close the parenthesis (round) and put a semicolon.

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

Method # 3. Inserting a video in HTML from Youtube

After the HTML5 preparatory file is created, you can start inserting video content from the YouTube service.

  1. First, you need to select a video clip that will be on the page. It should be stored on the local computer.
  2. You need to go to youtube.com. You should create your account or log into an existing one.
  3. After logging into your page in YouTube, you need to click the "Add Video" button, and then a window will appear, in which you will be asked to select the file to upload. The selected video will be downloaded after a while.
  4. You can go to the link of the downloaded file, which is located at the top.
  5. To get the code for inserting a video, you need to click "Share" and "HTML code". The page will output the program code that is needed. Here you can specify such parameters, such as: privacy mode, video size, the ability to show similar entries.
  6. After setting the parameters, the code is copied and pasted into the prepared HTML file.
  7. All is ready. Now it's clear how to insert a video into HTML from the YouTube service.

So, there were several ways of inserting video into HTML. Which option to choose is for the web programmer or site owner to decide.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.delachieve.com. Theme powered by WordPress.