styling post php markdown

How To Style The Post With PHP Markdown

ATX Heading

To add a heading, you just need to open with #. Get your heading text followed with “hash”. As we know there are 1-6 heading HTML tags, So adding the number of “hashes” will do all.

# This is heading 1 H1
## This is heading 2 H2
### This is heading 3 H3
#### This is heading 4 H4
##### This is heading 5 H5
###### This is heading 6 H6

You can close the atx-style header, if you think it looks better.

If you would like to add a line just below of the heading or just to separate the texts, use a horizontal line. Horizontal lines can be entered by using three hyphens or three asterisks.

- - -
* * *


Markdown uses email-style > character for blockquote. Add the open angular bracket (greater than sign) on each line.

> This is the first line of the blockquote.
> Another line if you want it to display.
> More will goes here.

Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by adding additional levels of >:

> This is the first level of quoting.
> > This is nested blockquote.
> Back to the first level.

Blockquotes can contain other elements including header, lists and code block. Normally any decent text editor should make an email-style quote easy.

> ## This is header
> 1. This is the first list item.
> 2. This is the second list item.
>Example code:
>    return shell("echo input");


Markdown supports ordered (numbered) and unordered (bulleted) lists. For unordered lists use hyphens, asterisks and pluses.

- List 1
- List 2
- List 3

+ List 1
+ List 2
+ List 3

* List 1
* List 2
* List 3

Ordered lists use numbers followed by periods.

1. List 1
2. List 2
3. List 3

You will get the same result if you use the list like this:

1. List 1
1. List 2
1. List 3


3. List 1
5. List 2
11. List 3


Markdown supports two style of links: inline and reference.

To create an inline link: use a set of regular parenthesis immediately after the line text’s closing square bracket. Inside the parenthesis, put the URL where you want to link to point, along with an optional title for the link, inside the double quotes.

This is [an example]( "Title") inline link.
[This link]( has no title attribute.


Markdown treats asterisks and underscores as indicators of emphasis. Wrapped the text to style it.

Single will give you italic and double give you bold style.

*italic text*
_italic text_
**strong text**
__strong text__

If you use the spaces before and after * and _ it will be treated as literal * asterisks and _ underscore.


To indicate span or code, wrap it with a pair of backtick. Single and double do the same job. It is very helpful when you need to indicate a single backtick within a code span.

Please do not use `<a>` tag.


``echo $input;``

``Single backtick (`) inside a code span``


Markdown uses the image syntax that is intended to resemble the syntax for links, allowing for two styles: inline and reference.

![Alt text](/path/to/img.jpg)
![Alt text](/path/to/img.jpg "Optional title")

Leave a Reply