Sign in

Blogger Help



How can I do more with links?

Print

Note: These tips can be used when you are directly editing the HTML of a post or template. They won't work with the Link List widget of Layouts.

The HTML for a basic link looks like this: <a href="http://URL">TEXT</a>

With this code, someone looking at your webpage will see the word or words you have as the TEXT. This text will be highlighted, and when clicked on, the browser window will go to the address specificed by the URL.

You can also create a link that people can use to email you. In the example above, just replace the http:// with mailto: and use your email address in place of the URL. It would looks something like this: <a href="mailto:myaddress@example.com">Email me!</a>

Sometimes, you may want to link to another webpage, but have it open in a new browser window, leaving the original webpage open beneath it. To do this, you can just add target="_blank" to the link. This tells the browser to make a new, blank window for the link. The link would then look like this: <a href="http://URL" target="_blank">TEXT</a>

If you decide you really want complete control over the new windows for your links, you can use JavaScript. Detailed instructions on how to do this can be found at HTML Goodies. Use these tricks with care, however, since it's easy to go overboard creating too many windows.

Was this article helpful?

Help resources