HTML Tutorial





Español Français 中文 Deutsch Portuguese Japanese nederlands
   
 
HTML Basic
Introduction
How To
HTML Tags
html, head, body
Text Manipulation
IMAGES
Special Effects
Using Tables
Forms
Other Topics
 

ADVANCED HTML
Introduction
Media
Meta Tag
Frame tags
Fieldset
Tooltip
DTD
Image tags
Subscript & Superscript
Bullet styles
Canvas
Other tags
Ask Your Doubts
More about HTML
Feedback
 

HTML Image Tag


Tutorials Html

Topic

How to insert a image in html?
Tag to set image border html?
I want to set image in both left and right ends in the same line?



Explanation

Image Tag: <img>

To insert a image in your a page we need to use the tag "img" with its attribute "src"
Example Code:
<img src="test.jpg">

Result:


Here we assume that we have the image file in the same directory of the html file.
We can also give the full path of the directory as
Example:
<img src="C:\images\test.jpg">


Width and Height:
We can resize images that are displayed in web pages using the attributes width and height.
Example Code:
<img src="test.jpg" width=100 height=100>
Result:



Alignment:
We can align the image using the attribute "align".
The attribute takes values left or right or center.
Example Code:
<img src="test.jpg" align=left> <img src="test.jpg" align=right>
Result:



Borders:
We can set border around images using the attribute "border". This can be used to create a space around the picture.
Example Code:
<img src="test.jpg" border=4>
Result:





Other Links

web hosting