Computer Forums

Computer Forums (
-   Programming (
-   -   Need help with adding gaphics to an html (

MartinC. 11-28-2009 02:22 PM

Need help with adding gaphics to an html
I am trying to add a graphic to an html (using notepad) but when I test the website, my graphic shows up as a tiny x with the filename by it. Can someone help me please? thanks in advance :)
'edit' sorry for posting this in the wrong place...

berry120 11-28-2009 03:44 PM

Re: Need help with adding gaphics to an html
sounds like you're not referencing the images properly - when you type the image name, you either need to type the relative path to it (relative to the HTML document you're writing) or the absolute name (so the absolute place on your hard drive or on the web that this image resides.)

If you're still stuck, post the relevant bit of HTML here - might help to work out where you're going wrong.

MartinC. 11-28-2009 03:51 PM

Re: Need help with adding gaphics to an html
I think I'm putting the right path, heres the html

<TITLE>Subscribe to Martin C. Design Forums</TITLE>
<BODY BGCOLOR="#ffffff">
<TD BGCOLOR="blue"><P ALIGN=Center>
<FONT face="Verdana,Helvetica" SIZE="3" color="orange">
<B>Subscribe to Claim Your FREE Gift and more information on computer programing and graphics</B></FONT>
<TD><B><FONT face="Verdana,Helvetica" SIZE="3" color="orange"><BR>
Subscribe to Martin C. Design Forums to recieve more information
on computer programing and graphics. <FONT color=
"blue">ALL new subscribers will receive 5 free icons.
<img src="icons1/mclogo1-1.jpg" alt="mclogo1-1"><br>
<INPUT type="text" name="email" value="type in your email"
size="20" onfocus="value=''">
<INPUT TYPE="submit" VALUE="Subscribe"></TD>
<P ALIGN=Center>
<A HREF="javascript: self.close()"><FONT face="Verdana,
Helvetica" SIZE="2">Close Window</FONT></A><BR>

P.S. there is no actaual Martin C. Design forums and also this is not completely made by me, it is a code that I copied of the internet and added some stuff to it and edited it.

berry120 11-28-2009 06:03 PM

Re: Need help with adding gaphics to an html
Well, is there a folder called icons1 that's in the same directory as the above HTML file? And has that folder got a file in it called mclogo1-1.jpg? That's what "icons1/mclogo1-1.jpg" means.

Incidentally - I'm not sure how much you wrote yourself but that's an appalling example of modern HTML. You shouldn't use things like font tags, that should all be in CSS, tags should be lower case, tags should always be opened and closed properly (and when you've only got one like <br> use a self closing tag like <br/>), you should always have a namespace... If you're looking to learn HTML properly I'd look at the W3C tutorials, and validate everything you write with the W3C validation service to make sure you don't get any errors. Believe me that above code will generate quite a few...!

Oh and just a heads up, it's worth putting large blocks of code like the above in [ CODE ] tags so it appears like so:


System.out.println("Hello world");

All times are GMT -5. The time now is 01:05 PM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0