Skip to main content
1 of 8
Jason S
  • 6.4k
  • 2
  • 33
  • 38

allowed syntaxes for an image with a link

In the case where you are trying to have an image with a hyperlink:

alt text http://www.gravatar.com/avatar/dd5a7ef1476fb01998a215b1642dfd07?s=128&d=identicon&r=PG

These work properly:

<a href="http://meta.stackoverflow.com/users/44330/jason-s">![alt text][1]</a> [1]: http://www.gravatar.com/avatar/dd5a7ef1476fb01998a215b1642dfd07?s=128&d=identicon&r=PG <a href="http://meta.stackoverflow.com/users/44330/jason-s"> <img src="http://www.gravatar.com/avatar/dd5a7ef1476fb01998a215b1642dfd07?s=128&d=identicon&r=PG"> </a> [<img src="http://www.gravatar.com/avatar/dd5a7ef1476fb01998a215b1642dfd07?s=128&d=identicon&r=PG">][2] [2]: http://meta.stackoverflow.com/users/44330/jason-s 

This does not:

<a href='http://meta.stackoverflow.com/users/44330/jason-s'>![alt text][1]</a> 

(single quotes not allowed?)

Is there a way to do the same thing in Markdown without having to resort to HTML?

Jason S
  • 6.4k
  • 2
  • 33
  • 38