...

View Full Version : <img> tag error



277772
11-06-2011, 12:51 AM
i am trying to place a image on my website but it won't let me could anyone tell me why it will not let me place the image where i want it?

CODE:


<html>
<head>
<title>My Webpage</title>
</head>
<body>
<img src="../logo.gif" height="60" width="1400" /> <-- IMG TAG ERROR
<fieldset>
<table align="right">
<tr>
<td>
<a href="LOGINPAGE.html" style="color:black;">Login</a>
<a href="REGISTERPAGE.html" style="color:black;">Register</a>
</td>
</tr>
</table>
<h1 align="center">Hi and Welcome to HTMLHelp.com</h1>
<table align="center">
<tr>
<td>
<div style="color:yellow;">
<a href="WEBPAGE(NOTLOGGEDIN).html" style="color:black;">Home</a>
<a href="ABOUTTHISWEBSITE(NOTLOGGEDIN).html" style="color:black;">About This Website</a>
<a href="FOURM(NOTLOGGEDIN).html" style="color:black;">Fourm</a>
<a href="LEARNINGHTML(NOTLOGGEDIN).html" style="color:black;" >Learning HTML</a>
</div>
</td>
</tr>
</table>
<table align="left">
<tr>
<td>
<iframe src="C:\Users\Graham\Desktop\WebPage\SCROLLINGCONTENT1.html" width="1081" height="500" scrolling="yes">
</iframe>
</td>
</tr>
</table>
<table align="right">
<tr>
<td>
<iframe src="C:\Users\Graham\Desktop\WebPage\SCROLLINGCONTENT0.html" width="200" height="500" scrolling="yes">
</iframe>
</td>
</tr>
</table>
</fieldset>
<img="\IMGS\BHS.png" alt="txt" height="304" width="505">

VIPStephan
11-06-2011, 01:07 AM
Is the file path correct?

teedoff
11-06-2011, 01:08 AM
Shouldn't that be:

<img src="myImageFolder/myImage.png">

Also, you should really use a valid doctype to help ensure cross browser compliance.

277772
11-06-2011, 03:13 PM
I really want to do a valid doctype but i don't know how, and thank you it worked after i changed the picture type to png.

P.S. could you send me a tutorial on how to make a valid doctype?

VIPStephan
11-06-2011, 03:16 PM
http://www.alistapart.com/articles/doctype/

277772
11-06-2011, 05:39 PM
thank you

hawaiiwebdesign
11-06-2011, 10:56 PM
Was the error the incorrect filepath?

Major Payne
11-07-2011, 02:17 AM
If this is online, then your iframe paths will not work:


<iframe src="C:\Users\Graham\Desktop\WebPage\SCROLLINGCONTENT1.html" width="1081" height="500" scrolling="yes">
</iframe>

That refers to your hard drive on your own computer. The image error may be because you have an incorrect relationship between where the image is and the page using it. Plus, you may have forgot to upload the image. Do not close the image tag unless you are coding to XHTML. Even then you'll be flagged for no alt="" attribute and no character set tag.

Why Validate?: http://validator.w3.org/docs/why.html
CSS Validator: http://jigsaw.w3.org/css-validator/
HTML Validator: http://validator.w3.org/#validate_by_uri+with_options

277772
11-11-2011, 02:49 PM
Hi guys, its me again the image shows but it is all blurry because it is a lot smaller than how big I am trying to put it.Is there anyway I can fix this???
:confused:

resdog
11-11-2011, 04:05 PM
get a higher resolution version of the image. There's not a way to resize an image Bigger without making it blurry.

felgall
11-11-2011, 08:44 PM
You shouldn't need to specify the width and height on the HTML for an image unless you specifically want the alternate text to fill the same space if the image doesn't load. The image itself already knows how big it is.

Major Payne
11-12-2011, 03:56 AM
Most images made at 72 - 96 DPI are good enough for the web. You should ALWAYS specify the width and height of an image regardless of whether the image is to be shown original size or not. Always tell browsers exactly what you want them to do when parsing your web page.

Enlarging low res images, as stated, is not a good idea unless it is a small increase in size which is under the level of distorting the image.

277772
11-13-2011, 05:35 PM
Question 1:How can I see what the current DPI of the image is?
Question 2:How can I increase the DPI of the image?

Major Payne
11-14-2011, 03:52 PM
1) Just right click on the image file and select Properties. If viewing in a browser, it may say Image Info.

2) You can increase the DPI, but it will not increase the resolution of a previously saved image at a lower DPI. You'll just increase the file size.

Might help:

Image Size and Resolution (http://www.espressographics.com/text/imagesize.html)

DPI - Changing/Setting DPI, dots per inch, pixels per inch (http://en.allexperts.com/q/Adobe-Photoshop-1028/Changing-Setting-DPI.htm)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum