C
The following is a summary of the general markdown language syntax.
Syntax | Appearance in GitHub | |
---|---|---|
Normal text |
![]() |
|
# h1 heading |
![]() |
|
## h2 heading |
![]() |
|
### h3 heading |
![]() |
|
#### h4 heading |
![]() |
|
##### h5 heading |
![]() |
|
###### h6 heading |
![]() |
|
Normal text |
![]() |
Syntax | Appearance in GitHub | |
---|---|---|
Normal text |
![]() |
|
> Yet beautiful and bright > He stood > As born to rule the storm |
![]() |
Syntax | Appearance in GitHub | |
---|---|---|
Normal text |
![]() |
|
*This is italics* |
![]() |
|
_This is also italics_ |
![]() |
|
**This is bold** |
![]() |
|
__This is also bold__ |
![]() |
|
They *can **be** combined* |
![]() |
|
This *is **also combined*** |
![]() |
Syntax | Appearance in GitHub | |
---|---|---|
Normal text |
![]() |
|
1. First entry 2. Second entry 3. Third entry |
![]() |
|
1. First entry 2. Second entry 1. First sub-entry 2. Second sub-entry 3. Third entry |
![]() |
Syntax | Appearance in GitHub | |
---|---|---|
Normal text |
![]() |
|
* First entry * Second entry * Third entry |
![]() |
|
* First entry * First sub-entry * Second sub-entry * Second entry * Third entry |
![]() |
Syntax | Appearance in GitHub | |
---|---|---|
Normal text |
![]() |
|
1. First entry 2. Second entry * First sub-entry * Second sub-entry 3. Third entry |
![]() |
|
* First entry * Second entry 1. First sub-entry 2. Second sub-entry * Third entry |
![]() |
Syntax | Appearance in GitHub | |
---|---|---|
Normal text |
![]() |
|
  |
![]() |
|
[GitHub](http://github.com) [Link text](URL) |
![]() |
Images can also be added by using basic HTML†1 , this allow the size and position of the image to be adjusted:
<p align="center"> <img width="200px" src="/11-resources/ 02-images/readme.png "> </p> |
![]() |
If they are given as a relative address:
/11-resources/02-images/02-build-status/build-badge.svg
they will not be displayed.
The reason appears to be some security issue “cross site scripting vulnerabilities”—whatever that means?
†1 | In the case of markdown, basic HTML is everything in HTML except the style attribute. |
GitHub flavoured markdown can use all the general markdown syntax and all of the following additions:
Syntax | Appearance in GitHub | |
---|---|---|
Normal text |
![]() |
|
``` <p align="left">Any text </p> ``` |
![]() |
|
```html <p align="left">Semantic colouring </p> ``` |
![]() |
|
Inline code ```git init``` fragment |
![]() |
The three ``` characters are back-ticks here for a list of language identifiers.
; follow these with a language identifier to give semantic colouring. SeeSyntax | Appearance in GitHub | |
---|---|---|
Normal text |
![]() |
|
- [x] Completed task - [ ] Open task - [x] Completed task - [ ] Open task |
![]() |
Syntax | Appearance in GitHub | |
---|---|---|
Normal text |
![]() |
|
| Header 1 | Header 2 | | -------- | -------- | | Cell A1 | Cell B1 | | Cell A2 | Cell B2 | |
![]() |
To split a heading onto two lines use <br> where you want the break to occur.
Syntax | Appearance in GitHub | |
---|---|---|
Normal text |
![]() |
|
@mgledhill link to a user |
![]() |
|
#1 issue to be resolved |
![]() |
Escape characters are used to display those characters that would otherwise have special meaning in markdown (putting asterisks around a word for example). Escaping a character is done by putting a reverse oblique (\) in front of it:
Syntax | Appearance in GitHub | |
---|---|---|
Normal text |
![]() |
|
\*asterisk around a phrase\* |
![]() |
The following characters can all be escaped:
\ ` * # + - . ! [ ] { } ( ) |