How to make a border attribute using Html? Gif, Jpg, Png!! |World24hub

How to make a border attribute using Html? Gif, Jpg, Png!! |World24hub

 Insert Image, GIF, JPG, PNG

HTML allows inserting of Static and animated images in an HTML page HTML accepts various pictures file formats.

GIF:

Graphics Interchange Format uses a maximum of 256 Colors. The GIF format is best for displaying images that have been designed to create logos, buttons and icons etc. In other hand, It also supports animated picture, Transparency etc

JPG:

Joint Photographic Experts Group is a good format for photographs because JPEG/JPG files contains millions of colors, JPG image don't provide option for interlancing images, but it make sure to allow to specify the degree of file compression so that there can be created a balance between image quality and proper file size

PNG:

Portable Network Graphic which is good for  combinations of text and graphics within one image. PNG permits true color images, variable transparency, platform-independent display, and a fast 2D interlancing scheme. Currently which is only supported by internet Explorer.

Inserting Images

Inserting an Image on the web pages is implanted by strating a tag so called <IMG> and closing the same tag with </IMG> in HTML. Along with the tag <IMG> tag, it must should contain an Attribute SRC which expresse the URL or location of the given image file. Let's have a look at this example: If the image is not in same location of HTML file, complete path has to be specified (e.g. C:/Image/computer.jpg)

In alternative of the SRC attribute, there are others attribute terms which can be replaced with it:

ALT:

          ALT so called Alternative Text is a text filed that describes an image or acts as a lable; it is  displayed when user turn the graphics off their browser.

ALIGN:

              ALIGN(Alignment) allows aligning an image on the Web page having options like middle, top, left etc

WIDTH:

                This express the width of an image in pixels. The value of a width can be omitted or discarded

HEIGHT: 

                  It expresses the height of an image in pixels. As a WIDTH features can be omitted HEIGHT also can be omitted.

BORDER: 

                 It is for the border around the image, specified in pixels. If image is being used in anchor tag <a></a> then it will give the border with value 1 as a default so it can hide the border attribute is used, to set the border value to zero. Here you will see an example of an border attribute.

    
    
    ‹HTML›
    
    ‹HEAD> ‹TITLE› Inserting Image ‹/TITLE› ‹/HEAD›
    
    ‹BODY›
          ‹IMG SRC="computer.jpg" HEIGHT="200" WIDTH="300" border=1›
    ‹ ! - Comment => some of the options. -->
    
    ‹/BODY>
    ‹/HTML>

Post a comment

Post a Comment