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

Php developer that has preceding experience with wordpress, Php developer t...

Php developer that has preceding experience with Wordpress and its plugins. Aim- Building E-commerce solutions utilizing WordPress plugins for a company which is selling a docum

Crud application criteria, CRUD application criteria -Use a proper data...

CRUD application criteria -Use a proper data model, this means using Object Oriented PHP if you choose PHP -This model should have around 6-8 properties -The model should

Expedia affiliate website designer required, New start hotel booking websit...

New start hotel booking website needs a designer for an Expedia affiliate website utilizing XML. Please see below for the Expedia description of the affiliate design needs. Must ha

Need help in image recognition software - opencv, Need help in Image Recogn...

Need help in Image Recognition Software - OpenCV Prototype Image Recognition service - focusing on brand/logo recognition plus objects - such as TV's Coffee Cups and so on. D

Php developer needed for google rank checker, PHP Developer Needed for Goog...

PHP Developer Needed for Google Rank Checker and Customer Portal Hired preceding developers and they did terrible work, We worked an great amount of hours and the money was wast

A script to spider and index a site needed, A Script to Spider and Index a ...

A Script to Spider and Index a Site, A Script to Search the Index I want a script that can take 1 or more URLs and spider and index a site. The script must essentially use an ex

Event handlers, An event handler executes segment of code depend on certain...

An event handler executes segment of code depend on certain events occurring in the application, like onClick or onLoad. JavaScript event handlers can be divided in two parts: non-

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

I need wordpress plugin development, Project Description: We have a cust...

Project Description: We have a custom booking engine software, which also powers reasonable functionality websites. In order to improve capability offering of our website, we ar

I need a help in css responsive site, I need a help in CSS responsive site ...

I need a help in CSS responsive site CSS responsive to convert site in to responsive Job Description- I have some web sites which want attention and I would like to work o

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