Monday, November 20, 2017

Adding Multimedia Elements


Now We'll Learn How to input Multimedia elements to a web page using HTML. We can add images video clips and audio tracks to websites.

Why use multimedia elements to a website?
Most probably the websites are used to promote something (goods,services). So, the web pages wants to be more attractive. Multimedia elements are used to attract people.

Adding an Image to a Website
Step 01: Open Notepad
Step 02: Type the code given below and save it. (with extension as .html)

<html>
<title> My Web </title>
<body> <h1> My Pet </h1>
<img src="C:\Users\kiyas\Desktop\NPShan\puppy.png">
</body>
</html>

This is the out of the following code.
















Let's see what is happening in the code...

All the code are same as previous. only the <img> tag was added. <img> tag is used to insert an image to a webpage.

<img src="location path of the image file" >

We should note that, images are not technically inserted into an HTML page and images are just linked to HTML pages.

Adding Video and an Audio to a Website

Adding Video and an audio clips are also something same as adding image to a website.

<video width="320" height="240" controls>
  <source src="movie.mp4" type="video/mp4">
</video>

This is a sample code to add a video clip to website. The tag <video> </video> will let the developer to add video clip on website.
<source src="location path of the video file" type="file type and format">


No comments:

Post a Comment

Why We Need Web Sites Imagine you are a web designer. You are meeting some people after long time, may be your friends or relations. Whe...