- 2

Difference between <href> and <iframe>:

The difference between <href> and <iframe> is not big. When you use href, then u must type text. With href you are making a hyperlink and when someone like me, click on the text, the program will redirect you in new page, or in the same (it depends on what you did have choosen). And iframe simply shows the website you have written betweeb the <iframe> brackets in the page where you are now. Page in Page. You must not click anything, because you will be able to see the website in the website.

29th Oct 2017, 8:51 AM
Aleksandar Markov
Aleksandar Markov - avatar
7 Réponses
+ 7
'href' is an attribute specific to some tags (not only <a> tag element, but also <link> for example)... 'href' and <iframe> are not comparable, but you can differenciate 'href' and 'src' attributes (last is not only specific to <iframe> but also used in <img> for example), or even differenciate <a> and <iframe> (first provide a clickable hyperlink -- anchor -- to load another ressource, second embed the loaded ressource in the document)... Check this stackoverflow thread for an accurate description of differences between 'href' and 'src': https://stackoverflow.com/questions/3395359/difference-between-src-and-href
29th Oct 2017, 10:47 AM
visph
visph - avatar
+ 5
Thank You? I must ask, is href a tag or an attribute because I always thought it was an attribute https://www.sololearn.com/Discuss/801692/?ref=app
29th Oct 2017, 8:58 AM
Koketso Dithipe
Koketso Dithipe - avatar
+ 5
Nice. Now you can add what you have read here to your ever-growing knowledge. Thank you for your efforts. It's people with a spirit like yours who help make SoloLearn a nice community.
29th Oct 2017, 9:17 AM
Koketso Dithipe
Koketso Dithipe - avatar
+ 3
Actually there is a rather distinct difference. href is an attribute specific to the <a> element which creates a hyperlink, the href attribute specifies the anchorage point associated with the element. Meanwhile the <iframe> element embedds another document in your html document, this can be used in several different ways for example embedding a map into your web side.
29th Oct 2017, 9:08 AM
Sebastian Ellies
Sebastian Ellies - avatar
+ 1
Here we go: <a href = "http://www.sololearn.com"><br /> Link <a/> and <iframe src="http://www.sololearn.com"> <iframe> This is an example for using href and iframe. Try it on the playground and you will see the difference. For the iframe also is not necessary to fill in text between the brackets, because it will be behind the website and you can't see it.
29th Oct 2017, 9:05 AM
Aleksandar Markov
Aleksandar Markov - avatar
+ 1
You have right. But I see many people, that can't see difference between href and iframe. That's why i did write this comment here. I am learning HTML since yesterday and I am still learning. Although I am trying to be helpful. :)
29th Oct 2017, 9:14 AM
Aleksandar Markov
Aleksandar Markov - avatar
0
Yep. ^^
29th Oct 2017, 9:19 AM
Aleksandar Markov
Aleksandar Markov - avatar