"Hello and Welcome to my blog" you can also find me on facebook as TAHA KHAN

Sunday 28 October 2012

Adding image or video into an HTML page

FOR
Adding image or video into an HTML page
 there are tags for each video and image

Firstly the image tag
<img>
this tag does not need a closing tag like  </img>

It just need an opening tag and then in " " the adress or reference of the image which is mostly from web but can also be in your  PC
just reference its path or link and then close it with just />

And one more important thing is that you have to give the lenght and width to the image or it may not be showen in your browser
so our full tag with image location and size would look like

<img src="http://asset2.cbsistatic.com/cnwk.1d/i/tim/2012/08/22/35414242_620x433.jpg"width="500" height="400"/>

this is a link which i used in my first page its a link to an image of a cheverle camero

and remember that this should be inside the body of the page
so Whole document will look like this
<!DOCTYPE html"


<html>
<head>
<meta charset="utf-8">
<title> Hello World </title>
</head>

<body>
<h4>its my favrt car </h4>

<img src="http://asset2.cbsistatic.com/cnwk.1d/i/tim/2012/08/22/35414242_620x433.jpg"width="500" height="400"/>  
      
    </body>
</html>

NOW About Adding Video in an HTML page


A video file can be inserted in a html page in two ways. The first way would be
using the <embed/> tag. This tag does not need an ending/finishing tag. It works, mostly, the same as a tag for an photo works

<embed src="example.mpeg" autostart="false" HEIGHT=60 WIDTH=144/>

Also, you can insert a video file using a link
<a href="example.mpeg">film name </a>
it is the same as adding an image

Hope this would be helpful