1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Markdown Basis

Last updated at Posted at 2015-08-12

Markdown Basis

1.Markdown Basics

Markdown allows you to write using an easy-to-read, easy-to-write plain text format, which then converts to valid HTML for viewing on GitHub

Basic writing

Paragraphs

Paragraphs in Markdown are just one or more lines of consecutive text followed by one or more blank lines.

On July 2, an alien mothership entered Earth's orbit and deployed several dozen saucer-shaped "destroyer" spacecraft, each 15 miles (24 km) wide.

On July 3, the Black Knights, a squadron of Marine Corps F/A-18 Hornets, participated in an assault on a destroyer near the city of Los Angeles.

Headings

You can create a heading by adding one or more # symbols before your heading text. The number of # you use will determine the size of the heading.

# The largest heading (an <h1> tag)
## The second largest heading (an <h2> tag)

###### The 6th largest heading (an <h6> tag)

Blockquotes

You can indicate blockquotes with a >.

In the words of Abraham Lincoln:

> Pardon my french

Styling text

You can make text bold or italic.

*This text will be italic*
**This text will be bold**

Both bold and italic can use either a * or an _ around the text for styling. This allows you to combine both bold and italic if needed.

**Everyone _must_ attend the meeting at 5 o'clock today.**

Lists

Unordered lists

You can make an unordered list by preceding list items with either a * or a -.

* Item
* Item
* Item

- Item
- Item
- Item
Ordered lists

You can make an ordered list by preceding list items with a number.

1. Item 1
2. Item 2
3. Item 3
Nested lists

You can create nested lists by indenting list items by two spaces.

1. Item 1
  1. A corollary to the above item.
  2. Yet another point to consider.
2. Item 2
  * A corollary that does not need to be ordered.
    * This is indented four spaces, because it's two spaces further than the item above.
    * You might want to consider making a new list.
3. Item 3

Code formatting

Inline formats

Use single backticks (`) to format text in a special monospace format. Everything within the backticks appear as-is, with no other special formatting.

Here's an idea: why don't we take `SuperiorProject` and turn it into `**Reasonable**Project`.
Multiple lines

You can use triple backticks (~~~) to format text as its own distinct block.

Check out this neat program I wrote:

~~~
x = 0
x = 2 + 2
what is x`
~~~

Links

You can create an inline link by wrapping link text in brackets ( [ ] ), and then wrapping the link in parenthesis ( ( ) ).

For example, to create a hyperlink to www.github.com, with a link text that says, Visit GitHub!, you'd write this in Markdown: Visit GitHub!.

Hilighting

==This sentence is hilighted.==

2.Syntax Highlighting

MacDown offers syntax highlighting in fenced code blocks with language identifiers through Prism.
This list is from Markdown official page.

![Syntax Highlighting Sample](./Macdown basis fig1.png)

Language ID Notes
apacheconf Configuration syntax for the Apache HTTP Server.
aspnet ASP.NET markup in .aspx files.
autohotkey
bash
c
c++ Alias to cpp.
clike Generic syntax for C-like languages.
coffee Alias to coffeescript.
coffee-script Alias to coffeescript.
coffeescript
cpp C++.
cs Alias to csharp.
csharp C#.
css
gherkin
git Syntax used in Git commit messages.
go
groovy
handlebars
haskell
html Alias to markup.
http Syntax used in HTTP requests and responses.
ini Windows INI format.
java
javascript
js Alias to javascript.
json Alias to javascript.
latex
markup Generic *ML syntax, e.g. HTML, XML, etc.
nasm The Netwide Assembler.
nsis
obj-c Alias to objectivec.
objc Alias to objectivec.
objective-c Alias to objectivec.
objectivec Alias to objectivec.
perl
php
py Alias to python.
python Python 2.
rb Alias to ruby.
rip
ruby
scala
scheme
scss
sh Alias to bash.
sql
swift Apple’s Swift programming language. Not the parallel scripting language.
twig
xml Alias to markup.
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?