The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> a href
ljF50
post Sep 10 2015, 11:57 AM
Post #1





Group: Members
Posts: 1
Joined: 10-September 15
Member No.: 23,511



Hi everyone,

this should be a simple answer or a stupid mistake on my part biggrin.gif .

I have an a href:

<a href="www.facebook.com/GravityBE" target="new">

However when clicking on the actual link it goes to:
http://gravity-design.be/www.facebook.com/GravityBE

How can this be? and better how can i fix this?

thanks,
Yannick

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Sep 10 2015, 12:19 PM
Post #2


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



This refers to the path "www.facebook.com/GravityBE" relative to the current document:
<a href="www.facebook.com/GravityBE" target="new">

This refers to the path "GravityBE" on the Facebook server:
<a href="http://www.facebook.com/GravityBE" target="new">

For details, see the FAQ entry How can I avoid using the whole URL?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Sep 10 2015, 12:31 PM
Post #3


.
********

Group: WDG Moderators
Posts: 9,653
Joined: 10-August 06
Member No.: 7



You need the http:// protocol (or in this case the encrypted https://, since FB uses that) in the URL as well. Without it you just have a relative link URL, which is then appended to the page's own URL (in this case http://gravity-design.be/).

Also, target="new" refers to a frame named "new". If you want to open a new window, use target="_blank" instead.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 20th April 2024 - 04:19 AM