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

Written by Michael Lee on March 23, 2016

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


Which yields:

<a href="">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="" 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, side projects and working remotely. Sign up and I'll send you my articles straight to your email.

:wave: Hey hey, I'm Michael Lee! I really appreciate you taking the time to read this article.

Be sure to check out my other articles.