Enjoy an ad free experience by logging in. Not a member yet?
Register .
11-05-2011, 11:51 PM
PM User |
#1
New Coder
Join Date: Jul 2011
Posts: 12
Thanks: 3
Thanked 0 Times in 0 Posts
<img> tag error
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">
11-06-2011, 12:07 AM
PM User |
#2
The fat guy next door
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,579
Thanks: 5
Thanked 864 Times in 841 Posts
Is the file path correct?
__________________
Don’t click this link !
11-06-2011, 12:08 AM
PM User |
#3
Senior Coder
Join Date: Aug 2010
Location: High Point, NC
Posts: 3,325
Thanks: 5
Thanked 363 Times in 360 Posts
Shouldn't that be:
<img src="myImageFolder/myImage.png">
Also, you should really use a valid doctype to help ensure cross browser compliance.
__________________
Teed
11-06-2011, 02:13 PM
PM User |
#4
New Coder
Join Date: Jul 2011
Posts: 12
Thanks: 3
Thanked 0 Times in 0 Posts
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?
11-06-2011, 02:16 PM
PM User |
#5
The fat guy next door
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,579
Thanks: 5
Thanked 864 Times in 841 Posts
__________________
Don’t click this link !
11-06-2011, 04:39 PM
PM User |
#6
New Coder
Join Date: Jul 2011
Posts: 12
Thanks: 3
Thanked 0 Times in 0 Posts
thank you
11-06-2011, 09:56 PM
PM User |
#7
New Coder
Join Date: Nov 2011
Location: Seattle, WA & Big Island, HI
Posts: 13
Thanks: 0
Thanked 3 Times in 3 Posts
Was the error the incorrect filepath?
11-07-2011, 01:17 AM
PM User |
#8
Regular Coder
Join Date: Aug 2005
Location: MS
Posts: 745
Thanks: 7
Thanked 65 Times in 63 Posts
If this is online, then your iframe paths will not work:
Code:
<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
__________________
☠ ☠ R O N ☠ ☠
11-11-2011, 01:49 PM
PM User |
#9
New Coder
Join Date: Jul 2011
Posts: 12
Thanks: 3
Thanked 0 Times in 0 Posts
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???
11-11-2011, 03:05 PM
PM User |
#10
Regular Coder
Join Date: Aug 2011
Location: U.S.A.
Posts: 233
Thanks: 2
Thanked 48 Times in 48 Posts
get a higher resolution version of the image. There's not a way to resize an image Bigger without making it blurry.
__________________
WordPress Designer and theme developer. KlongDesigns - helping bloggers and non-technical folks claim their space on the internet.
11-11-2011, 07:44 PM
PM User |
#11
Master Coder
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,447
Thanks: 0
Thanked 496 Times in 488 Posts
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.
11-12-2011, 02:56 AM
PM User |
#12
Regular Coder
Join Date: Aug 2005
Location: MS
Posts: 745
Thanks: 7
Thanked 65 Times in 63 Posts
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.
__________________
☠ ☠ R O N ☠ ☠
11-13-2011, 04:35 PM
PM User |
#13
New Coder
Join Date: Jul 2011
Posts: 12
Thanks: 3
Thanked 0 Times in 0 Posts
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?
11-14-2011, 02:52 PM
PM User |
#14
Regular Coder
Join Date: Aug 2005
Location: MS
Posts: 745
Thanks: 7
Thanked 65 Times in 63 Posts
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
DPI - Changing/Setting DPI, dots per inch, pixels per inch
__________________
☠ ☠ R O N ☠ ☠
Jump To Top of Thread
Thread Tools
Rate This Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT +1. The time now is 12:33 PM .
Advertisement
Log in to turn off these ads.