A reader asks:

First of all, thank you so much for all your help and answers to my past questions! On my blog when an image is put on a post, if you click on the image, it will open up to see a larger, closer view. This is great and I really appreciate that you can then see more details i the artwork that I do. However, is there a way where this can be done to open up into a new window? Like how you explained to add target=”_blank” to a link, so that it will open up in a new window. Can this be typed also into the images info on the HTML codes? Or is there some thing else that can be typed, so that this can be done?

Answer:

You can use “target=_blank” in ANY “<a>” tag no matter what the “<a>” tag encloses. You can wrap an image, text or other object in the “<a>” tag like this: <a href=”www.yourlink.com” target=”_blank”>Your text, image or object here</a>

Just put “target=_blank” anywhere in the opening “a” tag to cause it to open to new window. If you use Blogger to upload an image, they put a lot of long attributes into the whole string, but that doesn’t matter. As long as the “target=_blank” is somewhere in the opening “a” tag, it will work. Here’s samples from a Blogger upload, and then a more simple one from WordPress (which is also just plain old standard HTML except for the “mce_href” which is WordPress specific). Check them out…

Examples

Blogger Produced Code Using Blogger Upload:



WordPress and Standard HTML

0215099

Remember, you can link just about any object or piece of text in HTML. And if you can link it, the “target=_blank” will cause it to open in a new window.

Questions?

PS: WHAT ARE YOUR QUESTIONS FOR ME? Ask here. Want to book me for training, speaking or business consulting? Go here. If you benefitted from this post, would you be so kind to share this post with others by clicking one of the SHARE buttons?

Have you seen the EPIC BOOK? Over 400 big pages packed with tips, tricks, instruction and lessons learned from 15+ of blogging and being online. Click here for some more information...