Markdown is a PHP library for converting markdown to markup. It is a useful tool for creating documentation on a web page. For example, if your website contains a blog, wiki pages, any sort of editing from users you could allow them to style their documents using markdown.
#
<h1>
##
<h2>
###
<h3>
####
<h4>
#####
<h5>
## This is a Heading Two
will produce the following markup <h2>This is a Heading Two</h2>
__text__
Wrap text in __
to make it italics
__this text is italic__
will produce the following markup <em>this text is italic</em>
**text**
Wrap text in **
to make it bold
**this text is bold**
will produce the following markup <strong>this text is bold</strong>
[Text](Hyperlink)
Create links by inserting the link text in square brackets followed by the hyperlink in normal brackets
[Google](https://google.ie)
will product the following markup <a href="https://gooogle.ie" target="_blank">Google</a>
![Alt Text](link to image)
Create images by inserting the alternate text in square brackets followed by the link to the image in normal brackets
![Git Logo](https://assets-cdn.github.com/images/modules/logos_page/GitHub-Logo.png)
will produce the following markup <img src="https://assets-cdn.github.com/images/modules/logos_page/GitHub-Mark.png" alt="Git Logo" />
Create inline code elements by surrounding elements in ```var x;```
;
```var x;```
produces the following markup
<code>var x;</code>
if you need to span multiple lines use 4 back-ticks instead of three, and make sure to have one line break inside the back-ticks
List
- item one
- item two
- item three
will product the following markup
<ul>
<li>item one</li>
<li>item two</li>
<li>item three</li>
</ul>
List
1. item one
2. item two
3. item three
will product the following markup
<ol>
<li>item one</li>
<li>item two</li>
<li>item three</li>
</ol>
> this is a block quote
will product the following markup
<blockquote> this is a block quote</blockquote>
Tables can now be created by using the bar character. Use the |
character to outline your table and it's columns
|Heading One|Heading Two|Heading Three|
|Row1Col1|Row1Col2|Row1Col2|
|Row2Col1|Row2Col2|Row2Col2|
|Row3Col1|Row3Col2|Row3Col2|
produces a HTML table like:
<table border="border">
<thead>
<th>heading one</th>
<th>heading two</th>
<th>heading three</th>
</thead>
<tbody>
<tr>
<td>row1Col1</td><td>row1Col2</td><td>row1Col3</td>
</tr>
<tr>
<td>row2Col1</td><td>row2Col2</td><td>row2Col3</td>
</tr>
<tr>
<td>row3Col1</td><td>row3 col2</td><td>row3Col3</td>
</tr>
</tbody>
</table>