21

I often see files with a ".md" extension. I usually open them with a text editor like Gedit and I can read them just fine.

So – why do they use .md files and not say .txt files? Can somebody explain how .md files are different from regular .txt?

I did a web search but all I came across were wrong references to a "moneydance program file format".

slhck
  • 223,558
  • 70
  • 607
  • 592
Stann
  • 540
  • 1
  • 3
  • 12

1 Answers1

28

It's Markdown.

From Wikipedia:

Markdown is a lightweight markup language, originally created by John Gruber and Aaron Swartz allowing people "to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML)".The language takes many cues from existing conventions for marking up plain text in email.

Markdown files can be stored as .txt, but you'll also find:

  • .md
  • .mdown
  • .markdown

Having these clues as a file extension will let you easily transform these files into others. Markdown makes it very easy to convert these plaintext files into HTML, OpenDocument fiels, PDF, LaTeX or RTF using MultiMarkdown.

And, if you haven't noticed yet, StackExchange uses Markdown for formatting, too!

slhck
  • 223,558
  • 70
  • 607
  • 592
  • aha. i was just getting to the same conclusion. thanks. – Stann Jul 13 '11 at 20:27
  • Also see: [File extension for Markdown files?](http://superuser.com/questions/249436/file-extension-for-markdown-files) – slhck Jul 13 '11 at 20:29
  • You can also edit markdown-syntax files with Retext http://retext.sourceforge.net/ – mp04 Jul 14 '11 at 12:25
  • @nodiscc Yeah, there are a couple of MD editors out there, but that one looks nice! – slhck Jul 14 '11 at 12:57
  • In converters, there is also [pandoc](https://github.com/jgm/pandoc), which allows direct exports to many formats (including `.docx`) , but only support the [basic markdown syntax](http://daringfireball.net/projects/markdown/syntax) – bernard paulus Jul 04 '13 at 12:59