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.
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?
- 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.
- Take advantage of the numerous website designers, like ucoz.ru, jimdo.com, setup.ru, Wix.com, A5.ru, Fo.ru, rusedu.net, etc.
- Develop an online resource through CMS, i.e. content management system.
- 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:
- Computer networks of various kinds interact with one another via TCP / IP.
- The Web has become one of the Internet applications that are designed for mass distribution of a variety of information.
- 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.
- To transmit hypertext information, the web technology uses the HTTP protocol.
- HTML hypertext markup language is used to design and create web pages.
- 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.
- Find the third header and write the code directly below it:
- Open the page in the browser and make sure that the video appears.
- Be sure to correctly register the path to the roller.
- 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:
If the old browser does not understand a tag, then the code might look like this.
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.
- You need to download the files of the specified player to the local computer.
- Unzip them to a specific folder on the created site.
- 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.
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.
- First you need to select a video that will be on the page. It should be stored on the local computer.
- You need to go to the website youtube.com. You must create your account or enter an existing one.
- 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.
- You can follow the link of the downloaded file, which is located at the top.
- 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.
- After setting the parameters, the code is copied and pasted into the prepared HTML file.
- All is ready. Now I understand how to insert video into HTML from the YouTube service.
So, several ways to insert a video into HTML were considered. Which option to choose is up to the web programmer or site owner.