Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 11-28-2009, 03:22 PM   #1
Baseband Member
 
MartinC.'s Avatar
 
Join Date: Nov 2009
Posts: 56
Default 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...
__________________

__________________
all your base are belong to us
MartinC. is offline   Reply With Quote
Old 11-28-2009, 04:44 PM   #2
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default 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.
__________________

berry120 is offline   Reply With Quote
Old 11-28-2009, 04:51 PM   #3
Baseband Member
 
MartinC.'s Avatar
 
Join Date: Nov 2009
Posts: 56
Default Re: Need help with adding gaphics to an html

I think I'm putting the right path, heres the html

<HTML>
<HEAD>
<TITLE>Subscribe to Martin C. Design Forums</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff">
<CENTER>
<TABLE BORDER="0" CELLPADDING="2" ALIGN="Center">
<TR>
<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>
</TR>
<TR>
<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.
</FONT></FONT></B><BR>
<img src="icons1/mclogo1-1.jpg" alt="mclogo1-1"><br>
<BR>
<FORM METHOD="POST" ACTION="YOURFORM.cgi">
<CENTER>
<TABLE BORDER="0" CELLPADDING="2" ALIGN="Center">
<TR VALIGN="Top">
<TD>
<INPUT type="text" name="email" value="type in your email"
size="20" onfocus="value=''">
<INPUT TYPE="submit" VALUE="Subscribe"></TD>
</TR>
</TABLE>
</CENTER>
</FORM>
<P ALIGN=Center>
<BR>
<A HREF="javascript: self.close()"><FONT face="Verdana,
Helvetica" SIZE="2">Close Window</FONT></A><BR>
</TD>
</TR>
</TABLE>
</CENTER>
</BODY>
</HTML>

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.
__________________
all your base are belong to us
MartinC. is offline   Reply With Quote
Old 11-28-2009, 07:03 PM   #4
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default 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:

Code:
System.out.println("Hello world");
berry120 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 04:28 AM.


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