What does 'href' stand for?

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/en/courses/learn-html-css/lessons/common-elements/exercises/links

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
I wonder what “href” actually stands for. “a” for instance stands for anchor, which is pretty straightforward.

```

<a href="http://www.google.com/>Google

<do not remove the three backticks above>

A link in HTML terms is known as hypertext. That is the h in href. The ref part means reference.

The link element is <a></a>. Why a? That stands for anchor. Hypertext sends out a request for a given resource and once found, it plants an anchor whereby communication can travel back and forth along the imaginary cable that joins ship to its anchor point. Many of us old timers often called this a hook reference, which is more of a pun than tech speak. Get it, hook -> anchor?

Love it! Thanks for the fast and detailed response. Very insightful!

It just seems strange that “href” would also be an attribute to the link-tag, though. A css file does not include hypertext, does it?

1 Like

You’re welcome.

Also note that the ht in http is hyper text. as in hyper text transfer protocol. It is also the ht in HTML. Hyper Text Markup Language.

The way I understand from the lesson, hypertext refers to text that includes links, right? CSS files do not include links. Why would they be linked via <link href='file.css'/>? Shouldn’t it be <link src='file.css'/> instead?

for a better understanding
read
http://www.w3.org/TR/html4/struct/links.html

It is an href because it is a link to an external resource that does not load into the page. It loads in a metadata and is then parsed into the DOM.

src attributes are only found on object requests that can be embedded in the <body></body> element. We cannot embed images in the <head></head> and we cannot embed <link></link> in the <body></body> To confuse this, <script></script> may be embedded in either section. Those in the HEAD execute immediately, those at the end of BODY execute when the DOM content is loaded.

That makes perfect sense now. Thanks again!

1 Like

Also quite helpful. Thanks, Leonhard.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.