HTML Images - The <img> Tag and the Src Attribute
In HTML, images are defined with the <img> tag.The <img> tag is empty, which means that it contains attributes only, and has no closing tag.
To display an image on a page, you need to use the src attribute. Src stands for "source". The value of the src attribute is the URL of the image you want to display.
FOR EXAMPLE
<img src="url" />
The browser displays the image where the <img> tag occurs in the document. If you put an image tag between two paragraphs, the browser shows the first paragraph, then the image, and then the second paragraph.
More Example
Simple Image code
CODE:<img src="IMAGE LINK" />
Image code with link
CODE: <a href="YOUR LINK"><img src="IMAGE LINK" ></a>
Image code with given size
CODE: <img src="IMAGE LINK" height="120" width="120" >
ALT define the image description on mouse hover image
CODE:<img src="IMAGE LINK" alt="This is image" />.
you can also make the picture left ,right or in center
CODE: <img src="IMAGE LINK" align="center" />For more HTML tag goto this link
0 comments:
Post a Comment