Links and Images

This is a short lesson, just to get back into things.

To make a text link insert the following tags anywhere in the body of the page:

<a href=”http://simonsseagullphotographic.com/”>Simon’s Seagull Photographic</a>

Here I’ve used the url and name for Simon’s Seagull Photographic, a photo design company I work with, but obviously you’ll replace them with the name and url you actually want to be linking to.

Then this:

Simon’s Seagull Photographic

is what it’ll look like when put through an html editor and uploaded onto your site.

For embedding an image hosted on another site using its hyperlink you use the following tags instead:

<img src=”https://simonsseagullphotographic.files.wordpress.com/2014/12/245.jpg?w=767&#8243; />

img tag are self closing which is why its a solo tag instead of a pair and why it has a space and a slash before the closing bracket. Run the above code through an editor and it’ll look like this:

Now to turn that image into a link you use the following code:

<a href=”http://simonsseagullphotographic.com/2014/12/28/image-245-contrapposto-squirrel/”/><img src=”https://simonsseagullphotographic.files.wordpress.com/2014/12/245.jpg?w=767&#8243; /></a>

Clicking on the adorable squirrel should now take you to the picture’s parent site. This is because the code that inserts the image onto the page has taken the place of the text used in the basic text link I showed you at the start.

Advertisements
About

I'm an archivist living in Edinburgh. I have an undergraduate degree in medieval history and a special interest in early Christian and pre-Christian religion so I'll be talking about that quite a bit. I also cook, so I'll be posting recipes on here when I think of them.

Tagged with: , , , , , , ,
Posted in Learn to Code

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

Hours & Info
07736364859
ball.information.management@gmail.com
9am-7pm
%d bloggers like this: