views:

316

answers:

2

This is the original link <a href="http://link.com" class="noborder">my link</a>.

How do I translate it to Markdown? I don't know how to put the class in.

[mylink](http://link.com)

+1  A: 

You can't put a class into Markdown syntax. In most Markdown implementations you can embed HTML, so using your original HTML might work.

John Gruber (creator of Markdown) even does it this way:

http://daringfireball.net/projects/markdown/syntax.text

Brian McKenna
oh great thanks for the tip!
Barbara
+1  A: 

Brian is right. The standard Markdown dialect does not let you add classes, attributes, or ids to elements. That said, there are other dialects such as Maruku that do you give this sort of flexibility by introducing a meta-data syntax. Here's a couple example of what it looks like:

## A header with an id  ##  {: #the-head}
// => <h2 id="the-head">A header with an id</h2>

[a special url](/my-special-place.html){: .special}
// => <a href="/my-special-place.html" class="special">a special url</a>

A paragraph with a random attribute
{: random=attribute}
// => <p random="attribute">A paragraph with a random attribute</p>

For more information check out the Maruku meta-data proposal.

Xavi