Picture of Michael Lee
:wave: Hey hey, I'm Michael Lee and this is my site about being a developer, being a dad and making side projects.

How to set an anchor tag's target to blank in Markdown converted with Kramdown

Written on March 23, 2016

In Markdown, to create a link, you use this syntax:


Which yields:

<a href="http://google.com">Google!</a>

What the above does is creates a link that when clicked on, will take you to the linked website in the same browser tab. But sometimes, instead of opening up the website in the same browser tab, you’ll want the website to open in its own tab.

You achieve this by applying the target attribute like this:

<a href="http://google.com" target="_blank">Google!</a>

In Kramdown, the converter found in Jekyll allows you to use an inline attribute list (IAL). The syntax for this looks like:


IAL is denoted by the use of curly braces followed by a key-value pair.

Thanks for taking the time to read this article. I'd love to stay in touch and share more tips on programming and design and side projects. Sign up and I'll send you my articles straight to your email.