Tuesday, March 3, 2020

HTML : Working with IMAGES


WORKING WITH IMAGES:

There are following types of image formats:
Type
Specification
JPEG
Joint Photographic Experts Group, also called JPG format
BMP
Bitmap Picture
PNG
Portable Network Graphics
TIFF
Tagged Image File Format
GIF
Graphics Interchange Format (Animated Image)

There are two types of Images or Graphics:
1) Photographic Images => It is also called Bitmap or Raster Graphics. (Still Photograph)
Example: JPEG format. (JPG, BMP, PNG, TIFF)
2) Vector Graphics => It is also called Line Art Graphics.
Example: GIF format (Like a Motion Picture)


<IMG> Tag: This tag is used to insert an image into a webpage. Only start tag is required and supported by all the browsers.

Attribute
Specification and Value
SRC
It specifies name & location (path) of the image
HEIGHT
Height of the Image
WIDTH
Width of the Image
ALT
We can set an alternate text or message to display, if image is not available at the specified location.
ALIGN
LEFT, RIGHT, CENTER, TOP, BOTTOM, MIDDLE
BORDER
Set a positive integer pixel value and set zero for no border
HSPACE
Space between Left & Right Browser Wall and Image
VSPACE
Space between Top & Bottom Browser Wall and Image
NAME
Name of the Image
STYLE
Inline styling is used to apply a unique style (or formatting) to a single HTML element.
TITLE
Title of the tag (like “ToolTipText” in VB)
DYNSRC
This is used for inline Video means we can specify address of video clip.


Example:
<! MyIMAGE.HTML>
<HTML>
          <HEAD>
<TITLE> Working with Images </TITLE>
          </HEAD>

          <BODY   BGCOLOR=“YELLOW”  TEXT=“BLUE”>
                    <H1> Example of Images </H1>
                    <CENTER>

                             <IMG  SRC=“FLOWER.JPG”  HEIGHT=“200”  WIDTH=“300” Border=“6”  ALT=“Sorry, Image not available here!”> <BR><BR>

                   </CENTER>

</BODY>
</HTML>
~ ~ ~ ~ ~ ~ ~ * ~ ~ ~ ~ ~ ~ ~



Background Image:

<! BGIMAGE.HTML>
<HTML>
<HEAD>
<TITLE> Working with Images </TITLE>
</HEAD>

<BODY   TEXT=“BLUE”    BACKGROUND=“TULIPS.JPG”>
<CENTER>
<H1> Example of Background Image </H1>
<IMG SRC=“FLOWER.JPG”   HEIGHT=“150”  WIDTH=“200”>
</CENTER>
</BODY>
</HTML>
~ ~ ~ ~ ~ ~ ~ * ~ ~ ~ ~ ~ ~ ~

No comments:

Post a Comment