PDA

View Full Version : an HTML question



sundog
06-18-01, 11:30 PM
ok, i was programming a site in HTML and i put in an image as the head... i uploaded the image to the site and then i put in the code like this: <img scr="HTML://ban copy.jpg"> i also tried <img scr="ban copy.jpg"> both times when i viewed the site it came up with that thing with the triangle circle and box, all diff. color you know like just b4 a picture will come up? well the image never came up. wuts the problem? do i hafta wait a lil longer or is there a problem with the code? the image was pretty fancy..

Joe
06-18-01, 11:36 PM
Incorrect code

<img src="www.bob.com/bob.jpg"> </img>

that is the correct format.

sundog
06-19-01, 10:13 AM
ok so i have to put the site name and then the image file ?

striderf1
06-19-01, 02:24 PM
Originally posted by sundog
ok so i have to put the site name and then the image file ?

you can just put <img src="bob.gif"></a> as long as its on the server

el bob
06-20-01, 01:12 PM
you don't need a </img> tag

If the image is in the same directory (folder) that the .html or .htm file is in, then all you have to do for the SRC field is the filename and extension.

Ex:

www.mewantsdomain.com/here.html

/ (base directory)

here.html
bob.gif

------------
then in your html you would do
<img src="bob.gif">

if the situation was like this then...

/ (base directory)

here.html
images (no extension ---> directory)

/images

bob.gif

----------
then in your html it would look like this

<img src="images/bob.gif">

Good luck.

sundog
06-22-01, 01:28 PM
k thanks man......... take a look at it tho if u want....
http://www22.brinkster.com/thetst/home

mbryant707
06-22-01, 10:33 PM
I looked at your html and believe it needs to be more like this.

<code>



<html>
<head>
<title>*tSt* Delta Force LW Squad</title>
</head>
<body text="red">
<img src="bannercopy.jpg">
<p>Welcome to the *tSt* Homepage. We are a very
new DFLW squad. Please check out all of the links and enjoy your stay.</p>

</body>
</html>



</code>

sundog
06-25-01, 07:09 PM
hmmmmm ok i will try it,,, thanks

DiskDoc
06-25-01, 09:45 PM
Originally posted by PING
Incorrect code

<img src="www.bob.com/bob.jpg"> </img>

that is the correct format.


well to make it more correct, put http:// 1st. try linking a site with only www and see happens. you should always include http://

neutral
06-26-01, 09:01 AM
well, you can also include a BASE tag for your pages, then you do not need to add absolute links to each and every image/link/etc.

like this:

[goes above the HEAD tag, below any META tags]

<BASE HREF="http://www.thisismysite.com/index.html">

now you can name your link relative to their location on that server, ie:

<img src="images/myimage.gif">

which, with the base tag, translates to:

http://www.thisismysite.com/iimages/myimage.gif

make sure your images are uploaded on the remote [server] too, because even if previewed locally, it will hunt out the images from the server... that is the only drawback :/

sundog
06-26-01, 09:49 AM
ok...... do u havta put <img src="images/myimage.gif</a> ? <i>i wanna know do u hafta put the image before /myimage.jpg</a>?</i>

sundog
06-26-01, 09:51 AM
aw damn the <i> </i> didnt work for italics. when i put in bold it put in . is that in PHP?

sundog
06-26-01, 09:52 AM
u cant see wut i put in to show wut it puts in as bold so i guess it is PHP. here i will spread it out to show.. [ B ] [ / B ]

neutral
06-26-01, 09:56 AM
only if the image you are trying to reference is in a directory other than the ROOT of your server.

if the image is in the SAME directory as the page you are referencing the image for, then the code would simply be:

<img src="myimage.gif">

but say you put that image is a directory called graphics, then:

<img src="graphics/myimage.gif">

or in 2 directories, a COOL directory in the GRAPHICS directory:

<img src="graphics/cool/myimage.gif">

:)

DiskDoc
06-26-01, 11:09 AM
I READ ONE OF YOUR POST WHERE U SAID U KNEW html.. HMMMM