This forum is now read-only. Please use our new forums! Go to forums

0 points
Submitted by Shah Sultan Shourov
almost 10 years

HTML links and images

i cann’t use image url or web url….pls help me..

Answer 535ec48680ff334c94000317

0 votes

Permalink

(1) To embed an image in an HTML page we use the img tag: <img

(2) Then we use the image source attribute src: <img src="

(3) now we write the address of the image. You know it is a valid address if it ends with .jpg or .gif or .png:

<img src="http://s3.amazonaws.com/codecademy-blog/assets/f3a16fb6.jpg"

(4) Finally we apply the closing tag /> or just >. Make sure there is a "just before it:

<img src="http://s3.amazonaws.com/codecademy-blog/assets/f3a16fb6.jpg" />

And if all goes well it will look like this:

alt text


As for links…

A link starts with <a href=" Then we add the http:// part Then the address: www.facebook.com">

Now we add a title: <a href="http://www.facebook.com"> Google

and finally close it </a>: <a href="http://www.facebook.com">Google/a>


hope it helps!


New addition:

About: " ... at least one of my images also has to be a link?

This is a link, right?

<a href="http://www.facebook.com">Google/a>

Instead of the title (Google) We could put a url to an image. Let’s place the above image as a link:

<a href="http://www.facebook.com"><img src="http://s3.amazonaws.com/codecademy-blog/assets/f3a16fb6.jpg" </a>

points
Submitted by tony de araujo
almost 10 years

3 comments

Jenna G. almost 10 years

What does it mean when it says that at least one of my images also has to be a link?

tony de araujo almost 10 years

Hi Jenna, I have added more information at the very bottom of my previous message that addresses your question.

Jenna G. almost 10 years

Thanks I figured it out myself after getting frustrated.