DEV Community

Cover image for Image Tags in html
Niral
Niral

Posted on

Image Tags in html

While making a clickable image for my portfolio. I came across an issue which i am unable to resolve. I am making a clickable linkedin logo which takes the page to my linkedin profile in a new tab. but its opening in same tab instead. I've used anchor tags correctly with but its not working what would be the reason , can anyone resolve this ?
Image description

<!DOCTYPE html>




CSS Level 1

<br> button{<br> color:rgb(17, 2, 74);<br> }<br>


STARTING IN DEV


Hi i am Niral , B Tech grad in EEE from VJTI Mumbai



My interests in tech involve WEB DEVELOPMENT. I love making user friendly interfaces, throughout my dev journey i have built several frontend softwares.


I am proficient in HTML5, CSS3, Javascript & React.js. In Addtion i am proficient in C/C++ language and have handson experience on databases and OOPS

    <a href="https://www.linkedin.com/in/niralchokhandre?lipi=urn%3Ali%3Apage%3Ad_flagship3_profile_view_base_contact_details%3BEys7PWHjRYyM77dhPknA6g%3D%3D"tagret="_main"><img src= "https://store-images.s-microsoft.com/image/apps.31120.9007199266245564.44dc7699-748d-4c34-ba5e-d04eb48f7960.bc4172bd-63f0-455a-9acd-5457f44e4473"></a>

Top comments (4)

Collapse
 
moopet profile image
Ben Sinclair

If you want to open in a new tab, use target="_blank" instead of target="_main".
The problem you're having is probably that you're missing a space between the URL string and target:

href="..."target="_main" should be href="..." target="_blank".

Collapse
 
kaamkiya profile image
Kaamkiya

Correct, but they also misspelled "target" as "tagret".

Collapse
 
codebuddylarin profile image
Niral

Yeah i checked now my bad :) , Thanks for spotting the error!!

Collapse
 
codebuddylarin profile image
Niral

Ok got it @moopet , Thanks for your help !