Tricks & Shortcuts Tips

Read these 10 Tricks & Shortcuts Tips tips to make your life smarter, better, faster and wiser. Each tip is approved by our Editors and created by expert writers so great we call them Gurus. LifeTips is the place to go when you need to know about Html tips and hundreds of other topics.

Tricks & Shortcuts Tips has been rated 3.2 out of 5 based on 671 ratings and 23 user reviews.
How do I remove the underline from links?

Remove the underline from a single link

Here's a way to remove the underline from a single link on your page. If you're looking to remove the underline from all links on the page, see my tip in the design category.

Ok, here it is:

Add this attribute to your link

Here's an example and the code that produced it:

Example Link

<a href="" style="text-decoration: none">

How do I change the color of only one link?

Changing the color of a single link

Controlling the color of links on a web page is easy using the LINK and VLINK attributes of the BODY tag, as follows:

<A HREF="">Red Link</A>

But what if you want several links to have different colors? The logical approach is to use the FONT tag, in this manner:

<FONT COLOR="red"><A HREF="">Example Link</A></FONT>
<FONT COLOR="green"><A HREF="">Example Link 2</A></FONT>

But here is what it produces:

Example Link

Example Link 2

Now here is the correct way to achieve the desired result:

<A HREF=""><FONT COLOR="red">Example Link</FONT></A>
<A HREF=""><FONT COLOR="green">Example Link 2</FONT></A>

Which produces:

Example Link

Example Link 2

Can I add a background color to text?

Highlighting text

With this little trick, you can change the background color of text. If italics and bold don't give you the emphasis that you want, try this, it makes text look highlighted.

<SPAN STYLE="background:red">Highlighted Text</SPAN>

You can replace "red" with your choice of color. The above produces:

Highlighted Text

Can I make an email link with the subject line already filled in?

Email link with subject filled in

If you get alot of email through your website, I know you're wishing more people would put something in the subject field. Or, Let's say you have more than one product or service on your site, you can place a link for more information by each product/service and know before you read them what is being requested. Here's how:

This is the normal mailto link:

<A HREF="">Email Me</A>

To add the subject, simply add, &Subject=Your choice of subject here, after your address. The whole thing looks like this:

<A HREF=" choice of subject here">Email Me</A>

and produces this:

Email Me

How do I make a link open in a new window?

Open links in new window

The biggest drawback to using affiliate programs on our pages is the simple fact that we send our users away from our site. We all know how difficult it is to get them there in the first place, so why do we send them away so easily? If you use the TARGET attribute with your links, when someone clicks a link on your page, it opens in a new window. Then when that window is closed, they're back at your site. Place TARGET="_blank" into your links. An example is this:

<A HREF="" TARGET="_blank">Your Link</A>

Example Link

How do I make a mouse over description for a text link?

Text description mouseover

This trick will display a description of your choice when the mouse hovers over a text link. It's similar to the ALT tag for images.

<A HREF="" TITLE="Your Text Description">Example Link</A>

Example Link

How do I prevent browser cache on my pages?

Prevent browser cache

If you update you pages frequently, this trick is a must to ensure that your users see the most recent content. When someone views a webpage, thier browser will cache, or make a copy of, your page for faster loading on the next visit. To prevent this, add the following meta tag:

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

This, as with any meta tag, must be placed between the <HEAD> and </HEAD> tags.

How do I escape from frames?

Escape from frames

If your site has a possibility of being shown within someone else's frame, it's a good idea to provide a link on your site that will remove the frame. You may even notice that users are staying longer on your site!
Here's an example:

Example Frame Breaker

<A HREF="" TARGET="_top">Example Frame Breaker</A>

How can I automatically redirect to a different page?

Page redirect

Redirecting users to a different page is most useful when you change the webpage's address. If you think there's a chance that someone will go to the old address, ie from a search engine or link trade, leave the old page up as long as possible with the following modification.

<meta HTTP-EQUIV="REFRESH" content="0" url="">

This, as with all meta tags, needs to be placed between the <HEAD> and </HEAD> tags. You can change the content="0" to any number of seconds that you want the browser to wait before redirecting.

How can I write a list without bullets or numbers?

New Type of List

While learning HTML, you learned that there are 3 types of lists: the ordered list, which is numbered;
the unordered list, which is bulleted; and definition lists, which place a term flush left and indent
the definition on the next line. But what if you want a list without the bullets or numbers? Give this
trick a try. Create a <UL> as usual, just omit the <LI> tags. Seperate line items with the <BR> tag.
This trick works equally well for images.
Item 1<BR>
Item 2<BR>
Item 3<BR>
Item 4
This produces an indented list without bullets or numbers, like this;

    Item 1

    Item 2

    Item 3

    Item 4

One thing to note about this trick. Although it works fine with Internet Explorer and Netscape Navigator, it is not in accordance
with the W3C spec, and may not work with other browsers.

Not finding the advice and tips you need on this Html Tip Site? Request a Tip Now!

Guru Spotlight
Lynda Moultry