0

Question about <a href>

What would be the difference between <a href> and <a href='#'>?

16th Feb 2017, 11:27 AM
Alexandru Porumb
Alexandru Porumb - avatar
4 Respostas
+ 1
I mean both are hyperlinking, I get that, but is the '#' used to ref something inside the same html folder and regular href is mainly for external sources?
16th Feb 2017, 11:29 AM
Alexandru Porumb
Alexandru Porumb - avatar
+ 1
Use the href attribute to specify the url of the target of the link and # this means to locate the files,photos, videos,folder and make it a hyperlink
16th Feb 2017, 4:04 PM
Pranay Jain
Pranay Jain - avatar
0
yes, # is used to target id, so if you href # it means self, it will reference the element containing the href, used for demo hyperlinks and for not allowing a page in a static website to call itself.
16th Feb 2017, 11:34 AM
Andre van Rensburg
Andre van Rensburg - avatar
- 1
href="#" -> calling an item(tag) with particular id inside the same .html file href="url" -> calling some external .html file or completely different external source (ex. Google.com)
16th Feb 2017, 12:26 PM
Dev
Dev - avatar