I have found this code on stackoverflow, which is basically just code for baner. My question is, how to make so when when I press on banner a link opens in new tab?
Code:
<br/><br />
<a class="fragment" href="www.google.com">
<div>
<span id='close' onclick='this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode); return false;'>X</span>
<img src ="imgscr.com" alt="some description"/>
<h3>Your Text</h3>
<p class="text">
</p>
</div>
</a>
<style media="screen" type="text/css">
.fragment {
font-size: 12px;
font-family: tahoma;
height: 100px;
border: 1px solid #ccc;
color: #FFFFFF;
display: block;
padding: 10px;
box-sizing: border-box;
text-decoration: none;
background-color:#2E9AFE;
}
.fragment:hover {
box-shadow: 2px 2px 5px rgba(51, 134, 230, 1);
color:#2E9AFE;
}
.fragment img {
float: left;
margin-right: 10px;
}
.fragment h3 {
font-size: 30px;
padding: 0;
margin: 0;
color: #FFFFFF;
position: relative;
left: 50px;
bottom: -20px;
}
.fragment h4 {
padding: 0;
margin: 0;
color: #000;
}
#close {
float:right;
display:inline-block;
padding:2px 5px;
background:#ccc;
}
</style>