This forum is now read-only. Please use our new forums at discuss.codecademy.com.

HTML Basics Forum

View Course » View Exercise

246 points
5367d0128c1cccdfc800010d_555480480
Submitted by
Shah Sultan Shourov
about 3 years ago

HTML links and images

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


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>

2933 points
5533b41186f55278520000c6_295543857
Submitted by
tony de araujo
about 3 years ago

3 Comments

53bdb752282ae39c6e00095d_820898575 Jenna G. almost 3 years ago

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

5533b41186f55278520000c6_295543857 tony de araujo almost 3 years ago

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

53bdb752282ae39c6e00095d_820898575 Jenna G. almost 3 years ago

Thanks I figured it out myself after getting frustrated.