HTML Question

Wanna understand E=mc2, English grammer, or maybe just build a computer? We can help!

Moderator: Moderators

Post Reply
Sharpster
Inmate
Posts: 616
Joined: Mon Jan 03, 2005 9:57 pm

HTML Question

Post by Sharpster »

Im self teaching myself html and im "trying" to make a website for learning purposes and to just get exp with the whole coding thing.

My Website is:

http://liljohn.greatnow.com

I have a bunch of notes that ive taken and practiced from:

http://www.w3schools.com/default.asp



Ok anyway, like I said, I felt im doing ok for it being my first time trying this.
I am trying to make an img a link to somewhere on the WWW but the only links i can get from an img would be like to a diff page.

Ex. the main picture on the front, link it to like www.rapperpeople.com or somthing lol

i have notes on how to link to to another part in my site such as a differant page but basically W3 Schools didnt have anything on that.

Anyone help me with this ?

thx

EDIT: I just noticed the picture of the X with the flag in the upper left hand corner of the page.
And I can get it to to that (link it to another place on the site)

Dunno if this message was clear, hope you techies can figure it out :)
User avatar
XMEN Gambit
Site Admin
Posts: 4122
Joined: Thu Nov 18, 1999 12:00 am

Post by XMEN Gambit »

I can help you but not right now. I'm late!
Sharpster
Inmate
Posts: 616
Joined: Mon Jan 03, 2005 9:57 pm

Post by Sharpster »

heh figured ya could.

talk to ya later no rush
User avatar
XMEN Gambit
Site Admin
Posts: 4122
Joined: Thu Nov 18, 1999 12:00 am

Post by XMEN Gambit »

Ok, your "updates" link at the bottom of your main page goes to a different page on that same site. Was that what you were asking about or did I misinterpret?

To create an image that is a link, you just put the entire image tag (meaning open tag, close tag, and everything in between) inside the link tag, where the text that shows underlined would normally go. As you noticed the XMEN logo does at the top.

A link can be a link on your site anyone else's site, just put the whole "http" prefix, the domain name, and the path to the page you want. This board is on the xmenclan.org domain, and the subdirectory is forum, and the page that actually comes up is there because index.html redirects the request. There's a special sort of link within a page, and that's accessed by putting a "#" and the name of the anchor after the page name in the URL. You create those with... Well, just have a look here: http://www.w3.org/TR/REC-html40/struct/links.html

You know how to use the "view source" option in your browser, right? Using that, you can look at how anybody builds their site and use those same techniques in yours.
Sharpster
Inmate
Posts: 616
Joined: Mon Jan 03, 2005 9:57 pm

Post by Sharpster »

i dont think thats what i want. lol.

Me and some friends play CS and they told me to try and make a halfway decent site.

www.oia.greatnow.com

That main pic i wanna have it so i can click it and it will take me to another page which will be the main page.
User avatar
XMEN Gambit
Site Admin
Posts: 4122
Joined: Thu Nov 18, 1999 12:00 am

Post by XMEN Gambit »

There needs to be a file called index.html in the main web directory, so it gets loaded first. Your pic needs to be there ("img" tag) inside an "A" tag. The link specified in your "A" tag needs to be the location of your main page, whatever you want to call it.

That help?
Sharpster
Inmate
Posts: 616
Joined: Mon Jan 03, 2005 9:57 pm

Post by Sharpster »

Im not quite sure if i understood you .

The page that i had that picture on is saves as " index.html " does that matter ?
User avatar
XMEN Gambit
Site Admin
Posts: 4122
Joined: Thu Nov 18, 1999 12:00 am

Post by XMEN Gambit »

So, see, you're most of the way there. You have an index page, and it has the image you want on it. Now all you have to do is surround the image stuff with an anchor tag. Let me illustrate:


You have, on your page, something that looks like

Code: Select all

<img src="http&#58;//mydomain.com/mypic.jpg" />
or

Code: Select all

<img src="http&#58;//mydomain.com/mypic.jpg"></img>
(They're equivalent.)

Now, you just need to put link info around it, like this:

Code: Select all

<A href="menupage.html"><IMG src="http&#58;//mydomain.com/mypic.jpg" /></A>

Is that clearer? ;)
Sharpster
Inmate
Posts: 616
Joined: Mon Jan 03, 2005 9:57 pm

Post by Sharpster »

Yes much :)


Ight ill have to see if that works, and i think it does :) thx


EDIT: Woot <3 gambit
Post Reply