Adding Images in HTML
Adding Images in HTML
WEEK 2 (PART 2 OF 3)
<img> tag.
The source of the image is going to be the address of
the image.
JPEG or GIF??...
Lets Practice!
Go to Google shared folder and download the
index.htm
mugsy.png
Index.htm
<body>
<h1>Image and document on the same location</h1>
<p><p>
<h2>
syntax:
<p>
<img src="mugsy.png">
</h2>
This
This is
is where
where and
and
how
everything
<p>
how everything
changes!
<img src="mugsy.png">
changes!
</body>
</html>
Adding Images
Image file (.png) and
document file (.htm) is
located on the same
location
Adding Images
Adding Images
Adding Images
What if the document file is
located in another sub-folder?
Adding Images
Adding Images
TESTI
NG
IMAGE
S
HTML
2
HTML
3
mugsy.pn
g
index.h
tm
Common/Standard
Specific
Adding Images
<body>
TESTI
NG
HTML
index.h
tm
IMAGE
S
mugsy.pn
g
Text Wrapping
<img src="next.jpg" align="left" />
To allow text to wrap around an image, you just
need to add one of these commands to the image
tag:
align="left"
align="right"
Spacing Attributes
You can create space between the image and
surrounding text by defining vertical and
horizontal space like so:
<img src="image.jpg" vspace="5" hspace="10">