-2

this is my first year in html courses, i'm using HTML 4.01 Strict/XHTML 1.1 Where is the error in this code??

<a href="http://www.upv.es" onclick="target='_blank';">
<img src="http://politube.upv.es/templates/imagenes_cabecera/escudo.gif"/>
</a>

1 Answers1

0

Well, you don't provide us with information about what you expect and what is not working. If you try to open the link in a new Tab, you'll have to change

 onclick="target='_blank';"

to

target="_blank"

Otherwise, you'll be just setting a JavaScript variable target to the string value _blank.

Constantin Groß
  • 10,719
  • 4
  • 24
  • 50