GATE | GATE-IT-2004 | Questão 90
A seguir, são fornecidos vários usos da tag âncora em HTML.
<A HREF = "http://www.gate.ac.in/HTML/BASIC/testpage.html"> Teste mim </A>
<A HREFF = "/BASIC/testpage.html"> Teste Me </A>
<A HREFF = "testpage.html"> Teste Me </A>
<A HREFF = "testpage.html#test"> Teste Me </A>
Quais das opções acima são válidas?
(A) I e II apenas
(B) I e III apenas
(C) I, II e III apenas
(D) I, II, III e IV
Resposta: (D)
Explicação:
I is valid because the link given in href tag is a valid link. The link given is an absolute url and hence holds correct.
II is valid because the link given in href tag is relative url. It redirects the user corresponding to the domain name of the current page. If you are on domain name of geeksforgeeks as https://www.geeksforgeeks.org/ then it will take you to https://www.geeksforgeeks.org/BASIC/testpage.html and if you are on http://google.com/ then it will take you to http://google.com/BASIC/testpage.html
III is valid because it takes you to the page corresponding to the current url of the page. Please note that if we use / before testpage.html, then it is respect to domain not the complete url.
IV is valid because it takes you to the container with class/name as test on the same page.
Aprenda todos os conceitos do GATE CS com aulas gratuitas ao vivo em nosso canal do youtube.
As postagens do blog Acervo Lima te ajudaram? Nos ajude a manter o blog no ar!
Faça uma doação para manter o blog funcionando.
70% das doações são no valor de R$ 5,00...
Diógenes Lima da Silva