Bhojendra Rauniyar
Bhojendra Rauniyar

Reputation: 85593

href attribute with http

Normally we would add a link like this

<a href="http://www.stackoverflow.com/">Stackoverflow</a>

but while reading a book I found like this

<a href-http://www.stackoverflow.com/>Stackoverflow</a>

Is this a mistake, if not What are the differences between them and why to use href="ulr" and href-http: "url" ?

Upvotes: 0

Views: 69

Answers (3)

cavaliercyber
cavaliercyber

Reputation: 234

You can try in real situation the second is incorrect format.

see in this fiddle http://jsfiddle.net/fLpk2/

<a href-http://www.stackoverflow.com/>Stackoverflow</a> 

Second user click it but nothing happen that prove it may be textbook has mistake.

Upvotes: 0

Hybrid82
Hybrid82

Reputation: 253

<a href="http://www.stackoverflow.com">Stackoverflow</a> is the correct format ;)

As for the second example you provided that actually came out of a textbook, that is a typo and incorrect.

Upvotes: 0

Joseph Silber
Joseph Silber

Reputation: 220136

It is a typo. That - should simply be a =.

Upvotes: 1

Related Questions