tags:

views:

69

answers:

3

that is, a whole html link, must be in line1 or line 2. not in two lines.

+4  A: 

You can use <a><nobr>link</nobr></a>

Please note: This will work but is not officially supported by the W3C spec.

gmcalab
Yes, but keep in mind it is not officially supported by the W3C spec.
Justin Ethier
@Justin Ethier, very good point I will add this to the answer.
gmcalab
+7  A: 

Using CSS:

a {
    white-space: nowrap;
}

This will prevent line breaks in any A tags.

Jez
+3  A: 

According to this post:

NOBR Tag not suppored by W3C. So use the alternative tag for it. Instead of giving NOBR tag give the tag as style="WHITE-SPACE: nowrap".

So that would mean you should say:

<a style="WHITE-SPACE: nowrap">link</a>

Or even better, put it inside your CSS:

a { WHITE-SPACE: nowrap; }
Justin Ethier