Questions tagged [href]

Hyperlink (or link) is a reference to a document that the reader can directly follow, or that is followed automatically.

Hyperlink (or link) is a reference to a document that the reader can directly follow, or that is followed automatically.

A hyperlink points to a whole document or to a specific element within a document. Hypertext is text with hyperlinks. A software system for viewing and creating hypertext is a hypertext system, and to create a hyperlink is to hyperlink (or simply to link). A user following hyperlinks is said to navigate or browse the hypertext.

A hyperlink has an anchor, which is the location within a document from which the hyperlink can be followed; the document containing a hyperlink is known as its source document. The target of a hyperlink is the document, or location within a document, to which the hyperlink leads. Users can activate and follow the link when its anchor is shown, usually by touching or clicking on the anchor with a pointing device. Following the link has the effect of displaying its target, often with its context.

Links are specified in HTML using the (anchor) elements. To see the HTML used to create a page, most browsers offer a "view page source" option. Included in the HTML code will be an expression in the form symbol "," marking the start of an anchor, followed by the highlighted text and the "" symbol, which indicates the end of the source anchor. The element can also be used to indicate the target of a link.

http://en.wikipedia.org/wiki/Hyperlink

5033 questions
64
votes
4 answers

href="#" Going to Top of Page - Prevent?

I have a page with some jQuery functions. The HTML on the page looks like so: Open When I click the Open button a hidden panel slides out. The jQuery itself works great however when I click the button it also takes…
L84
  • 45,514
  • 58
  • 177
  • 257
62
votes
5 answers

How to remove "href" with Jquery?

Qualify After "href" is removed, is "Qualify" still clickable?
Steven
  • 24,410
  • 42
  • 108
  • 130
60
votes
9 answers

How can I disable the bootstrap hover color for links?

I am using Bootstrap. Bootstrap defines a:hover, a:focus { color: #005580; text-decoration: underline; } I have this links / CSS-classes green text yellow text How can I disable…
wutzebaer
  • 14,365
  • 19
  • 99
  • 170
59
votes
10 answers

How can I get href links from HTML using Python?

import urllib2 website = "WEBSITE" openwebsite = urllib2.urlopen(website) html = getwebsite.read() print html So far so good. But I want only href links from the plain text HTML. How can I solve this problem?
user371012
  • 593
  • 1
  • 4
  • 4
56
votes
6 answers

AngularJS All slashes in URL changed to %2F

I'm having a massive problem with AngularJS routing. Up until recently everything has been fine with the following route: $routeProvider.when('/album/:albumId', { controller: 'albumPageController', templateUrl: 'views/album.html' }); and…
MC123
  • 845
  • 2
  • 8
  • 12
56
votes
10 answers

Why is it bad practice to use links with the javascript: "protocol"?

In the 1990s, there was a fashion to put Javascript code directly into href attributes, like this: Press me! And then suddenly I stopped to see it. They were all replaced by things like:
zneak
  • 134,922
  • 42
  • 253
  • 328
55
votes
4 answers

href syntax : is it okay to have space in file name

it has always been my practice that when ever i use images i name them like walls_ico , bu_hover so when i give paths they go like UNTIL now when i am on a project where users…
Moon
  • 19,518
  • 56
  • 138
  • 200
54
votes
6 answers

What is the difference between "window.location.href" and "window.location.hash"?

I learned "window.location.hash" new and tried in my jquery code instead of "window.location.href" and both of them gave same results. Code is here : window.location.href = ($(e.currentTarget).attr("href")); window.location.hash =…
kalaba2003
  • 1,231
  • 3
  • 20
  • 33
52
votes
4 answers

Href without http(s) prefix

I just have created primitive html page. Here it is: example And here is its markup: www.google.com
http://www.google.com As you can see it contains two links. The first one's…
Pupkin
  • 1,211
  • 3
  • 13
  • 30
51
votes
4 answers

Html- how to disable ?

I created a button that open a modal window on click. For some reason the data-role="disabled" doesn't…
sarit rotshild
  • 733
  • 2
  • 10
  • 19
48
votes
4 answers

Why is the hash part of the URL not available on the server side?

For example if I type in the URL: http://www.foo.com/page.php?parameter=kickme#MOREURL Then on the server there is no part: #MOREURL Is possible to send or get these part to the server without jQuery AJAX?.
CRISHK Corporation
  • 2,948
  • 6
  • 37
  • 52
46
votes
12 answers

jQuery hyperlinks - href value?

On my website I use jQuery to hook the events of elements, namely hyperlinks. As these hyperlinks only perform actions on the current page, and do not lead anywhere, I have been putting a href attribute of "#" in: My Link However in…
Tom
  • 4,341
  • 9
  • 27
  • 21
43
votes
8 answers

CSS: Style external links

I want to style all external links in my website (Wordpress). I'm trying with: .post p a[href^="http://"]:after But Wordpress put the entire url in the links... So, how could I style all links that doesn't start with http://www.mywebsite.com…
thom
  • 433
  • 1
  • 4
  • 4