How To Open in a Small New Window Using HTML
I’m keeping this blog post short so it will be easy for you to understand. First off below is how the link would look if it
were an image.
The code for the above is below:
<a href=”https://advertising-blog.org/vincecarter.htm”
onclick=”window.open(‘https://advertising-blog.org/vincecarter.htm‘,
‘newwindow’, ‘width=540, height=408‘); return false;”rel=”me
nofollow”>
<img src=”https://advertising-blog.org/wp-content/uploads/2015/12/Vince-Carter-Dunks-over-Frederic-Weis.jpg” alt=“Vince carter Dunks on Frederic-
Weis” width=”250” height=”318” />
The portions highlighted in red above must be changed and the portions in blue should also be changed based on your desired
sizes. Also the quotation marks(” “) may also need to be change.
If you want the above in text form use the code below:
Vince carter Dunks Over Frederic-Weis
<a href=”https://advertising-blog.org/vincecarter.htm”
onclick=”window.open(‘https://advertising-blog.org/vincecarter.htm‘,
‘newwindow’, ‘width=540, height=408‘); return false;”rel=”me nofollow”>
Vince carter Dunks Over Frederic Weis</a>
I know what some of you might be thinking. How about opening into a new Image well you can do that using the code below:
Vince carter Dunks Over Frederic Weis
<a href=”https://advertising-blog.org/vc.htm”
onclick=”window.open(‘https://advertising-blog.org/vc.htm‘,
‘newwindow’, ‘width=250, height=318’); return false;”rel=”me nofollow”>
Vince carter Dunks Over Frederic Weis</a>
For the record the HTML for https://advertising-blog.org/vc.htm file reads like this:
<html>
<head>
<style type=”text/css”>
body {
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
}
</style>
</head>
<body>
<img src=”https://advertising-blog.org/wp-content/uploads/2015/12/Vince-Carter-Dunks-over-Frederic-Weis.jpg” alt=”starting” style=” width=”250″ height=”318” />
</body>
</html>
Notice the width and the height are the same as the new window that opens.
If you found this blog post informative please share it with a friend.