Skip to content

Markdown Syntax Guide

Italics and bold text

Markdown Code

This is plain text

_This is italic text_

**This is bold text**

Rendered HTML

This is plain text

This is italic text

This is bold text

Headers

Headers in markdown (much like HTML) come in various sizes.

Markdown Code

# First level header
## Second level header
### Third level header
#### Fourth level header
##### Fifth level header
###### Sixth level header

In this simple example you can see some headers have less hashes then others. The more hashes added, the smaller the header will be, for example.

Rendered HTML

First level header

Second level header

Third level header

Fourth level header

Fifth level header
Sixth level header

Ordered lists

Ordered or numbered lists are fairly simple to do in markdown.

Markdown Code

1. First item
2. Second item
3. Third item

Rendered HTML

  1. First item
  2. Second item
  3. Third item

Unordered lists

Unordered lists are great for general lists that don't need to be done in specific steps.

Markdown Code

* this
* is
* unordered

Rendered HTML

  • this
  • is
  • unordered

Nested lists

Markdown Code

* Markdown lists are:
    * awesome
    * amazing
    * really cool

Rendered HTML

  • Markdown lists are:
    • awesome
    • amazing
    • really cool

Tables

Markdown Code

| Table Header 1 | Table Header 2
| --- | ---
| Row 1, Column 1 | Row 1, Column 2
| Row 2, Column 1 | Row 2, Column 2

Rendered HTML

Table Header 1 Table Header 2
Row 1, Column 1 Row 1, Column 2
Row 2, Column 1 Row 2, Column 2

External URL's

Markdown Code

[The OpenIndiana Website](http://www.openindiana.org)

or (bare url's)

<http://www.openindiana.org>

Rendered HTML

The OpenIndiana Website

or (bare url's)

http://www.openindiana.org

Internal URL's

Internal URL's operate a little differently than external URL's. Simply specify the relative path to the document. You can even target a specific section of the document.

Markdown Code

[The OpenIndiana Handbook - getting started](../handbook/getting-started.md)

[Handbook - Appendix - Finding Help and Support](../handbook/appendix.md#finding-help-and-support)

Rendered HTML

The OpenIndiana Handbook - getting started

Handbook - Appendix - Finding Help and Support

Images

Specify the relative path to the image, just like an internal URL.

Markdown Code

![openindiana logo](../Openindiana.png)

Rendered HTML

openindiana logo

Block quotes

Markdown Code

> This is a block quote.
> And here is the 2nd line of the quote.

Rendered HTML

This is a block quote. And here is the 2nd line of the quote.

Code blocks

Code blocks are created by "fencing" the block of code using three (3) backtick marks. For the purpose of syntax highlighting, you may also specify the programming language.

Markdown Code

```markdown
#!/bin/bash
  if [ "foo" = "foo" ]; then
    echo expression evaluated as true
  fi
```

Rendered HTML

#!/bin/bash
  if [ "foo" = "foo" ]; then
    echo expression evaluated as true
  fi

In-line code

In-line code is delineated with a single backtick mark at each end of the text.

Markdown Code

Here is some plain Markdown followed by `a section of in-line code`.

Rendered HTML

Here is some plain Markdown followed by a section of in-line code.

In-line HTML

In addition to Markdown plain text markup, the Mkdocs frameworks also supports the inclusion of in-line HTML. For example, sometimes you may find Markdown doesn't do quite what you need to do. In these cases you may include some in-line HTML.

Markdown Code

<!-- This is a single line comment -->

<!--
This comment
spans multiple
lines
-->

Comments are meant to be hidden, so they not rendered as HTML. You'll likely find them very useful for adding TODO lists, or other useful notes. Comments are primarily for internal use by members of the OpenIndiana documentation team.

In-line HTML - Advanced

Using HTML within Markdown tables

Markdown Code

| Item | Description
| --- | ---
| Item 1 | This is a single line description
| Item 2 | This is a multi line description with an unordered list:<ul><li>First item</li><li>Second item</li></ul>Lets add another paragraph to that.</p> And here it is.
| Item 3 | We can also use multiple sentences within tables. Here is the second sentence. And here is a third.

Rendered HTML

Item Description
Item 1 This is a single line description
Item 2 This is a multi line description with an unordered list:
  • First item
  • Second item
Lets add another paragraph to that.

And here it is.
Item 3 We can also use multiple sentences within tables. Here is the second sentence. And here is a third.

Bootstrap elements

The OpenIndiana Docs website uses a CSS theme derived from Bootstrap. More specifically it uses the Spacelab theme from Bootswatch. This means elements from the Bootstrap framework may be used in-line right along with Markdown text markup.

In many of the examples on this page, Bootstrap HTML wells were used.

You can find a complete list of available HTML elements here: https://bootswatch.com/spacelab/

For further information about how to use the Bootstrap framework, see here: http://www.w3schools.com/bootstrap/default.asp

Font Awesome elements

Font Awesome is a collection of web icons which may be used within the MkDocs framework.

In many of the examples on this page, Font Awesome icons were employed.

For further information about how to use Font Awesome web icons, see here: http://fontawesome.io/

Further reading


Last update: 2023-09-03 19:46:49
Created: 2016-06-06 02:47:56