Working with images in html, PHP Web Programming

Assignment Help:

Now let us make our web pages more exciting through putting in images.

134_WORKING WITH IMAGES in Html.png

You indicate an image along with the <IMG> (image) tag. Previously in this unit, on a page displaying the images was described via the BACKGROUND attribute of the <BODY> tag that displays the image like the background image. Background images built the page heavy and therefore the page takes a significant amount of time to load. But the <IMG>tag can be utilized for displaying an image along with the needed height & width. Let us look at an example

<HTML>

<HEAD>

<TITLE>XYZ</TITLE>

</HEAD>

<BODY BGCOLOUR="#FFFFFF">

<IMG SRC="ima.jpg" WIDTH=130 HEIGHT=101 ALT = "IMAGE IS TURNED OFF" ALIGN = "BOTTOM" BORDER = 2> This text is placed at the middle of the image.                                                                                                                                                  

</BODY>

</HTML>

 

1415_WORKING WITH IMAGES in Html1.png

Figure: Displaying Images on a Web Page

Let us take a consideration at the syntax of the <IMG> tag:

<IMG SRC = "FILENAME.GIF" WIDTH = "value" HEIGHT = "value"  ALT = "alternate text" BORDER = "value" ALIGN = "value">

 a. SRC: This attribute denote the pathname to the source file that contains the image. The value in the above example, "image.gif", refers that the browser will look for the image named image.gif in the same folder (or directory) as the html document itself.

b. WIDTH: This is used for specifying the desired width of the image.

c. HEIGHT: This is used for specifying the desired height of the image.

d. BORDER: An important attribute of the IMG tag is BORDER. This attribute denoted the width of the border of the image. By default it is 0, i.e. there is no border. As shown in Figure the image "image.gif" has been given a border 2 pixel wide. The following code gives a wider border to the above image.

<BODY BGCOLOUR="#FFFFFF">

<IMG SRC="image.gif" WIDTH=130 HEIGHT=101 BORDER=10>

</BODY>

e.  ALT: Another IMG attribute that is important is ALT. ALT is sort of a substitute for the image that is displayed or used when the user is using a browser that does not display images. Someone may be using a text only browser, he might have image loading turned off for speed or he may be using a voice browser (a browser where the web page is read out). In those cases, that ALT attribute could be very important to your visitor as it could be used (given the proper text) to describe the image that is not on the screen.


Related Discussions:- Working with images in html

Need help in website plateform exchange, Need help in Website plateform exc...

Need help in Website plateform exchange Here is a brief introduction to the kind of website/plateform I will need. Expert that companies accounts with employees account withi

Desire for help in metasearch infrastructure on website, Desire for help in...

Desire for help in Metasearch infrastructure on website We are seeing for experienced computer programmers that have built search engines met search or indexing sites in the pas

I need a three page website, I need a three page website I have a homepa...

I need a three page website I have a homepage as well as two internal page designs ready in fireworks. I want these three pages online by the weekend. More work if we discover a

Need help in web form designing tool, Web Form Designing Tool We are in ...

Web Form Designing Tool We are in search of a brilliant HTML, CSS & jQuery Developer who will be accountable for the development as well as deployment of Form Designing Template

TAsk assignment, Design for assigning the work task to the employees?

Design for assigning the work task to the employees?

We want to create a ecommerce site simplistic professional, We want to crea...

We want to create a Ecommerce site simplistic professional Make a wordpress compatible ecommerce site preferably woocommerce or another commonly used ecommerce tool. Job Desc

Need help to make user registration a two-step process, Need help to Make u...

Need help to Make user registration a two-step process I have an partial Wordpress website that needs to be completed. There are about 15-20 things that want to be done however

Convert a non-responsive wordpress theme to responsive theme, Convert a non...

Convert a non-responsive wordpress theme to responsive Twitter Bootstrap3 My website is a none responsive wordpress theme. I want to translate this theme into responsive theme u

I want a help in malware check as well as removal, I want a help in Malware...

I want a help in Malware check as well as removal Want a WordPress programmer to check as well as remove possible malware on my website. Not sure what is wrong however I see

Wix commerce site needs shopping backend integration, WIX commerce site nee...

WIX commerce site needs 1shopping backend integration Project Description: We sell children's furnitureRIEchildrensFurniture and want a robust backend integrated shopping car

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd