Code Monkey home page Code Monkey logo

markdown-grammar's Introduction

Markdown-Grammar

This repository shows you how to use markdown so that you can create better documentation and reports

Table of contents

Headings
Paragraphs
Line Break
Italic
Bold
Bold and Italic
Strikethrough
Link
Images
Blockquotes
Tables
Ordered Lists
Unordered Lists

Heading 1

MARKDOWN: # Heading 1

OR

===========

HTML5 TAG:  <h1>Heading 1</h1>

Heading 2

MARKDOWN: ## Heading 2

OR

------------

HTML5 TAG:  <h2>Heading 2</h2>

Heading 3

MARKDOWN: ### Heading 3

HTML5 TAG:  <h3>Heading 3</h3>

Heading 4

MARKDOWN: #### Heading 4

HTML5 TAG:  <h4>Heading 4</h4>
Heading 5
MARKDOWN: ##### Heading 5

HTML5 TAG:  <h5>Heading 5</h5>
Heading 6
MARKDOWN: ###### Heading 6

HTML5 TAG:  <h6>Heading 6</h6>

Heading Best Practices

DO: # Space between content and your #

DON'T: #Write without a space between number signs and header content
MARKDOWN: Paragraphs are so much easier in markdown

HTML5 TAG: <p>Paragraphs are so much easier in markdown</p>

Paragraphs Best Practices

DO: Keep content left-aligned like this documentation

DON'T: Tab or space at the beginning of a paragraph as this can result in bad formatting unless in a list

Tab Example:

    Hello world

Formatting

Markdown: First line, add two spaces at the end [SPACE] [SPACE]    
          Oh hey a new line

HTML5 TAG: First line, add two spaces at the end <br>
           Oh hey a new line

Line Break Best Practices

DO: First line with two spaces after.[SPACE] [SPACE]    
    And the next line.

    First line with the HTML tag after.<br>
    And the next line.

DON'T: First line with a backslash after.\
       And the next line.

       First line with nothing after.
       And the next line.

Example

Markdown: What is this *sideways text*.

HTML5 TAG: What is this <em>sideways text</em>.

Italic Best Practices

For compatibility sake we recommend using * over _
DO: What is this *sideways text*.

DON'T: What is this _sideways text_.

Example

Markdown: That's a **bold statement**.

HTML5 TAG: That's a <strong>bold statement</strong>.

Bold Best Practices

  For compatibility sake we recommend using ** over __
  DO: That's a **bold statement**.

  DON'T: That's a __bold statement__.

Example

Markdown: What is this ***sideways and bold text***.

Alternative Markdown:

          What is this ___sideways and bold text___.

          What is this __*sideways and bold text*__.

          What is this **_sideways and bold text_**.

HTML5 TAG: What is this <strong><em>sideways and bold text</em></strong>.

Bold and Italic Best Practices

For compatibility sake we recommend using *** over ___
DO: This is ***the right approach***.

DON'T: This is ___not___.
Markdown: ~~Strikethrough text~~

HTML5 TAGS: <strike>Strikethrough text</strike>

            OR

            <s>Strikethrough text</s>

Example

  Markdown: [Named Link](http://www.google.fr/ "Named link title")

  Markdown Alternatives:

  http://www.google.fr/

  <http://example.com/>

  HTML5 TAG:  <a href="https://github.com/Styrle">Visit my portfolio</a>

Images Inline

alt text

MARKDOWN:
![alt text](https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png "Logo Title Text 1")

HTML5 TAGS:    
<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" alt="Github logo">

Images Reference

Github logo

MARKDOWN:
![alt text][logo]

[logo]: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png "Logo Title Text 2"

HTML5 TAGS:   
<img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png"  alt="Github logo" title="Github logo">

Images Reference Best Practices

DO: Add a line break between the alt text and the reference to the image

DON'T: Put the alt text and image reference next to each other like the markdown text displays

Example

Markdown:  > Nice Blockquotes

HTML5 TAG: <blockquote> Nice Blockquotes </blockquote>
Tables Are Cool
col 1 is left-aligned $1600
col 2 is centered $12
col 3 is right-aligned $1
Markdown:
| Tables   |      Are      |  Cool |
|----------|:-------------:|------:|
| col 1 is |  left-aligned | $1600 |
| col 2 is |    centered   |   $12 |
| col 3 is | right-aligned |    $1 |

HTML TAGS:
<table>
  <tr>
    <th>Tables</th>
    <th>Are</th>
    <th>Cool</th>
  </tr>
  <tr>
    <td>col 1 is</td>
    <td>left-aligned</td>
    <td>$1600</td>
  </tr>
  <tr>
    <td>col 2 is</td>
    <td>centered</td>
    <td>$12</td>
  </tr>
  <tr>
    <td>col 3 is</td>
    <td>right-aligned</td>
    <td>$1</td>
  </tr>
</table>
Markdown:
1. First item
2. Second item
3. Third item
    1. Indented item
    2. Indented item
4. Fourth item

HTML5 TAGS:
<ol>
  <li>First item</li>
  <li>Second item</li>
  <li>Third item
<ol>
  <li>Indented item</li>
  <li>Indented item</li>
</ol>
  </li>
  <li>Fourth item</li>
</ol>
Markdown:
- First item
- Second item
- Third item
    - Indented item
    - Indented item
- Fourth item

HTML5 TAGS:
<ul>
  <li>First item</li>
  <li>Second item</li>
  <li>Third item
<ul>
  <li>Indented item</li>
  <li>Indented item</li>
</ul>
  </li>
  <li>Fourth item</li>
</ul>

markdown-grammar's People

Contributors

styrle avatar

Watchers

 avatar

markdown-grammar's Issues

Add emoji context

Create an easy to read best practices piece of content to follow.

ID Headings

ID all sections to create the table of contents for the project

Add good vs bad uses for all tags

Create a list of items which may have backwards compatibility and list the most appropriate version that the users should be using

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.