Image syntax
John Gruber
gruber at fedora.net
Wed Jul 27 16:09:09 EDT 2005
A. Pagaltzis <pagaltzis at gmx.de> wrote on 07/27/05 at 8:31 pm:
> In the text document, images inlined in the middle of a paragraph
> and regular links are virtually identical. It seems only natural
> to use virtually the same syntax for both.
Well, we're stuck with the existing ![][] image syntax for backwards
compatibility, so you can safely keep using it for inline images.
> Shortcuts are fine, I’d just hate to have to jump through the
> same hoops as on some wikis, where hacks like appending a `?` to
> an image URL so I can make it a simple link, or appending
> `&bogus=param.png` to the URL of a CGI script that generates
> images to make it an inline image are the norm – because there’s
> no other syntax for forcing a link vs an image than the last
> couple of characters in the URL.
>
> That is plainly B.A.D.
True. That's the idea behind using the <…> delimiters around the URL.
> > These ideas look much more like how I would reference an image
> > in a plain text email message or text document.
>
> But what you’re providing as an alt text is not a replacement. It
> is a title, or caption. alt is not meant for that. It is for a
> replacement to be read in place of the image within the flow of
> text. Illustrative images like a screenshot do not get an alt
> text; they are not an equivalent replacement to anything, and
> short of a thousand words, they cannot be described adequately.
> 99% of the images used on the web today should have `alt=""`.
I strongly disagree with that. I use alt attributes to provide a
description of the image, for those who can't or aren't viewing
images. That's not the same thing as a caption at all -- captions
are something that's appropriate even if you can see the image.
> If you take that into account, then the syntax already in
> Markdown is already roughly as you want it:
>
> ![](http://example.org/foo.png
> "A screenshot of whatever")
That's not what I want at all. It's quite gibberishy. Markdown
shouldn't look as though it uses as many funny punctuation
characters as Perl.
-J.G.
More information about the Markdown-Discuss
mailing list