The general coding examples listed below can be used to link to a LiveJournal, a friend's LiveJournal entry, your own LiveJournal entry, an external web site, and an individual file hosted on an external website. Note that if you are linking to a large external file such as music or video, your hosting service may impose limits that prevent your link from working all the time.
Automatic Text Formatting
If you add an URL (Internet address for a web site) beginning with
http:// or
https:// in an entry, Automatic Text Formatting will turn it into a link. You can turn off this behavior with the
Text Formatting option when posting an entry or with the
<lj-raw> tagRich Text Editor
You can use the
Rich Text editor to create links in a new journal entry without using HTML; you cannot use the Rich Text Editor when editing a journal entry. When updating your journal with the Rich Text editor, you will need to type the link text first and then select it before generating the link.
Linking to Other Journals or Web Sites with HTML
You can use HTML to link to the journal of another user or web site.
<a href="http://exampleusername.livejournal.com">This is a link to my journal!</a>
This will create the link
This is a link to my journal!, linking to your journal. Before using the link in your own journal, you should replace the URL and the text label; either replace your username with the appropriate username, or replace the entire URL with the URL for the link.
Turning an Image into a Link
When
adding an image to a LiveJournal page, you can turn the image into a link by putting the code for the image between the opening and closing tags. For example:
<a href="http://www.example.com"><img src="http://www.example.com/image.jpg" alt="title or description" border="0" /></a>
If you would like a border to appear around the image you are using as a link, change
0 to a positive number; increasing the number increases the size of the border.
Note that any images you would like to use as links must be uploaded to a webspace provider that allows
remote loading to LiveJournal.