You are here: Blog » Code Snippets » Form Target _Blank

Form Target _Blank


I always knew that you could make a link open up in a new window by adding target=”_blank” to an a tag. However I recently learned that this also works for forms and allows you to designate a form to submit in a new window. This is a useful technique to use in cases where you want your visitors to submit a form where the action is on another website, but at the same time you would like to keep your visitors active on your current site.

Here is how you would do that:


The target=”_blank” method is technically deprecated but it is simple, effective and still widely used.

This entry was posted in Code Snippets by .

Author: justin saad

Justin Saad is first and foremost a husband and a father of four. He is also a web developer and designer who has been making websites for over twenty years. His company is called The Motech Network and his website is In addition to building websites, Justin makes WordPress plugins and likes writing tutorials to help others learn about various aspects of web development.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">