Chris McKitterick (mckitterick) wrote,
Chris McKitterick
mckitterick

Basic linking and image tutorial (plus a little Astro-Porn)

This is Teh Age of Teh Intartubes, and everyone who posts to blogs or has a website should know a little HMTL. Here's how you type a link:

<a href="link-path" target="_blank">Text that shows up in LJ and describes link</a>

Insert the path to your link inside the quotation marks; use the _blank value for the target attribute to open the link in a new tab or window so the reader doesn't get lost and can return to LJ without clicking "back" a hundred times.

If you want to link a photo, use this:

<a href="link-path" target="_blank"><img src="link-to-photo"></a>

Here you have an anchor tag (that's what a does) again, which is what makes the image link to a website, and that link is anchored to an image (that's what img does) instead of text - works the same!

If an image you want to show is really big (on LJ, consider anything wider than 640 pixels to be too big to fit most display styles), you can cheat it down in size by modifying the code like this:

<img src="link-to-photo" width="600">

The width attribute tells the internet browser how wide it should display an image, no matter how wide it originally appeared; note that you don't need to define height in modern browsers.

Here's how it looks in practice, showing some awesome water geysers blasting into space over Saturn's moon, Enceledaus:


Click the image to see the story.


Hope that helps!

Chris
Tags: astronomy
Subscribe

  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 19 comments