` element.
```md
| Default aligned | Left aligned | Center aligned | Right aligned |
|-----------------|:-------------|:---------------:|---------------:|
| First body part | Second cell | Third cell | fourth cell |
| Second line | foo | **strong** | baz |
| Third line | quux | baz | bar |
|-----------------+--------------+-----------------+----------------|
| Second body | | | |
| 2nd line | | | |
|-----------------+--------------+-----------------+----------------|
| Third body | | | Foo |
{: .custom-class #custom-id}
```
**Output**
{: .panel-heading}
| Default aligned | Left aligned | Center aligned | Right aligned |
|-----------------|:-------------|:---------------:|---------------:|
| First body part | Second cell | Third cell | fourth cell |
| Second line | foo | **strong** | baz |
| Third line | quux | baz | bar |
|-----------------+--------------+-----------------+----------------|
| Second body | | | |
| 2nd line | | Hello World | |
|-----------------+--------------+-----------------+----------------|
| Third body | | | Foo |
{: .custom-class #custom-id}
Certain tools can help you to create your own complex table if you need merging lines or columns,
and more advanced layouts. This is a [Table Generator] that might help you out.
Note that the bars, spaces, and dashes were used symmetrically above just for providing a nice
view of the table markup. The symmetry is not required.
Read through the [kramdown syntax guide][kram-tables] on tables for further information.
----
## Collapse
A collapsed content section is used to hide information until a user chooses to reveal it with a click or tap on the summary text. The hidden content is revealed inline. For example, this code:
```markdown
This is the summary text, click me to expand
This is the detailed text.
We can still use markdown, but we need to take the additional step of using the `parse_block_html` option as described in the [Mix HTML + Markdown Markup section](#mix-html--markdown-markup).
You can learn more about expected usage of this approach in the [GitLab UI docs](https://gitlab-org.gitlab.io/gitlab-ui/?path=/story/base-collapse--default) though the solution we use above is specific to usage in markdown.
```
results in:
{::options parse_block_html="true" /}
This is the summary text, click me to expand
This is the detailed text.
We can still use markdown, but we need to take the additional step of using the `parse_block_html` option as described in the [Mix HTML + Markdown Markup section](#mix-html--markdown-markup).
You can learn more about expected usage of this approach in the [GitLab UI docs](https://gitlab-org.gitlab.io/gitlab-ui/?path=/story/base-collapse--default) though the solution we use above is specific to usage in markdown.
{::options parse_block_html="false" /}
----
## Code blocks
There are a few options for displaying code blocks with kramdown. Most of them use backticks ``` ` ```.
### In-line
This is an ``` `in-line` ``` code block.
**Output**
{: .panel-heading}
_In-line_
This is an `in-line` code block.
### Fenced
```
def hello
puts "Hello world!"
end
```
_Fenced Highlighted_
```ruby
def hello
puts "Hello world!"
end
```
or
```
def hello
puts "Hello world!"
end
```
{: .language-ruby}
**Output**
{: .panel-heading}
_Fenced_
```
def hello
puts "Hello world!"
end
```
_Fenced Highlighted_
```ruby
def hello
puts "Hello world!"
end
```
or
```
def hello
puts "Hello world!"
end
```
{: .language-ruby}
### Indented
Add 4 white spaces before every line:
def hello
puts "Hello world!"
end
_Indented Highlighted_
def hello
puts "Hello world!"
end
{: .language-ruby}
**Output**
{: .panel-heading}
_Indented_
def hello
puts "Hello world!"
end
_Indented Highlighted_
def hello
puts "Hello world!"
end
{: .language-ruby}
### Nested
Add 4 white spaces before every line. This is used when you want to display a code block
within a code block.
```
def hello
puts "Hello world!"
end
```
**Output**
{: .panel-heading}
_Nested_
```
def hello
puts "Hello world!"
end
```
### In lists
Indent the text of each item in 3 white spaces. Leave blank lines between the code block and the list items,
and ident the code block in 5 white spaces:
1. Item 1
1. Item 2
```ruby
def hello
puts "Hello world!"
end
```
1. Item 3
**Output**
{: .panel-heading}
1. Item 1
1. Item 2
```ruby
def hello
puts "Hello world!"
end
```
1. Item 3
----
## Blockquotes
Blockquotes are good resources to mentioning someone else's quotes, like we did [just above](#quote).
Also, can be used to emphasize a sentence or a small paragraph.
```md
> This is a blockquote.
> On multiple lines.
That may be lazy.
>
> This is the second paragraph.
----
> This is a paragraph.
>
> > A nested blockquote.
>
> ### Headers work
>
> * lists too
>
> and all other block-level **elements**.
>
> Even code blocks:
>
> def hello
> puts "Hello world!"
> end
> {: .language-ruby}
```
**Output**
{: .panel-heading}
> This is a blockquote.
> On multiple lines.
That may be lazy.
>
> This is the second paragraph.
----
> This is a paragraph.
>
> > A nested blockquote.
>
> ### Headers work
> {:.no_toc}
>
> * lists too
>
> and all other block-level **elements**.
>
> Even a code block:
>
> def hello
> puts "Hello world!"
> end
> {: .language-ruby}
----
## Notes
```md
This is a regular paragraph.
**Note:** a note is something that needs to be mentioned but is apart from the context.
{: .note}
```
**Output**
{: .panel-heading}
This is a regular paragraph.
**Note:** a note is something that needs to be mentioned but is apart from the context.
{: .note}
----
## Comments
_Markdown markup_
```md
This is a paragraph
{::comment}
This is a comment which is
completely ignored.
{:/comment}
... paragraph continues here.
```
_Regular HTML markup_
{: .language-html}
**Output**
{: .panel-heading}
This is a paragraph
{::comment}
This is a comment which is
completely ignored.
{:/comment}
... paragraph continues here.
----
## Anchors
Add an anchor anywhere with:
```
[](){: name="hello-world"}
Some text
```
Or simply use an ID:
```
Some text
{: #hello-world}
```
----
## Font Awesome
Yes, we can use fancy [Font Awesome] icons too.
_Regular_
```
### Puzzle Icon
{: #puzzle}
```
And you can go further, such as the following.
_Styled_
```
### Purple GitLab Tanuki
{: #tanuki-purple}
### Orange GitLab Tanuki
{: #tanuki-orange}
```
**Output**
{: .panel-heading}
_Regular_
### Puzzle Icon
{: #puzzle}
----
_Styled_
### Purple GitLab Tanuki
{: #tanuki-purple}
### Orange GitLab Tanuki
{: #tanuki-orange}
When doing something like this to a heading, it's important give it a custom ID (e.g., `{: #puzzle}`),
otherwise the one automatically created by kramdown will sound very awkward.
The class `fa-fw` is used when you want to display the icons as a list. They will be aligned, as well as
the text right beside them.
See live examples [on this post][ssgs-post], where the icons are used to illustrate the text.
-----
## Classes, IDs, and attributes
Defining CSS classes, and elements IDs and attributes with markdown is definitely something unusual (kramdown magic!).
But yes, if you know how to use it, you'll love it! Check how easy it is to do that with kramdown:
```
Paragraph
{: .class .class-1 .class-2}
Paragraph
{: #custom-id}
Paragraph
{: .class .class-1 #custom-id-1}
## Heading
{: .class .class-1 #custom-id-2}
Paragraph
{: .class #custom-id-3 style="padding-top:0" key="value"}
## Heading {#hello}
List:
- {: .class} List item with custom class
- {:#id} List item with custom id
To a [link]{: #link}, in-line.
This is a [link][google-es]{:hreflang="es"} in Spanish.
[link]: https://google.com
[google-es]: https://google.es
```
**Output**
{: .panel-heading}
Paragraph
{: .class .class-1 .class-2}
Paragraph
{: #custom-id}
Paragraph
{: .class .class-1 #custom-id-1}
### Heading
{: .class .class-1 .no_toc #custom-id-2}
Paragraph
{: .class #custom-id-3 style="padding-top:0" key="value"}
### Heading {#hello}
{: .no_toc}
List:
- {: .class} List item with custom class
- {:#id} List item with custom id
To a [link]{: #link}, in-line.
This is a [link][google-es]{:hreflang="es"} in Spanish.
[link]: https://google.com
[google-es]: https://google.es
### Special classes
#### Shadow
The CSS class called `shadow` should be used when your image edges are not clearly defined.
This happens when it has a white background or when it's a screenshot with text (for example,
a screenshot of our user interface). For example, this image can be mistaken as part
of the text:

Now, if you apply the class `shadow` to the image, it's discreetly highlighted from the text:
{: .shadow}
To do that, apply the class directly to the image by adding the markup `{: .shadow}` right after the image
markup:
```md
{: .shadow}
```
#### Note
As [previously](#notes) explained, you can add the class `note` to paragraphs that
you don't want to call attention to:
**Note:** this is something I don't want to call attention to.
{: .note}
Markup:
```md
**Note:** this is something I don't want to call attention to.
{: .note}
```
#### Colors
Add a custom class to a heading or paragraph using the following special classes.
**GitLab Orange**
#### GitLab Orange Heading
{:.gitlab-orange .no_toc}
Markup:
```
### GitLab Orange Heading
{: .gitlab-orange}
```
**GitLab Purple**
#### GitLab Purple Heading
{:.gitlab-purple .no_toc}
Markup:
```
### GitLab Purple Heading
{: .gitlab-purple}
```
#### Text Align
By default, the text will always be aligned to the left. You have a few
options to customize it with custom classes:
- Center: `.text-center`
- Right: `.text-right`
- Justify: `.text-justify`
For demonstrations purposes, they are aligned
in an [alert box](#colorful-sections), but this can be
applied to regular paragraphs and headings.
**Align to the center**
Center-aligned
{: .alert .alert-info .text-center}
Alert box markup:
```md
Center-aligned
{: .alert .alert-info .text-center}
```
Paragraph markup:
```md
Center-aligned
{: .text-center}
```
Heading markup:
```md
### Center-aligned
{: .text-center}
```
**Align to the right**
Right-aligned
{: .alert .alert-info .text-right}
```md
Right-aligned
{: .alert .alert-info .text-right}
```
**Justify**
Justified
{: .alert .alert-info .text-justify}
```md
Justified
{: .alert .alert-info .text-justify}
```
----
## Mix HTML + Markdown Markup
Mixing HTML markup with markdown is something almost "unthinkable" to someone used to regular markdown.
And it's all over this document!
Use the following markup at the beginning of your document:
```md
{::options parse_block_html="true" /}
```
And feel free to mix everything up:
```
Something in **markdown**.
Then an HTML tag with crazy **markup** _all over_ the place!
```
**Output**
{: .panel-heading}
Something in **markdown**.
Then an HTML tag with crazy **markup** _all over_ the place!
You can close the markup parser tag at any point, if you want to:
```md
{::options parse_block_html="false" /}
```
----
## Colorful sections
To add notes and warning blocks into colorful boxes,
we are making use of Bootstrap's [panel blocks] and [alert boxes].
Colorful sections are applied for very specific purposes and must not be overused.
Use panels when your description contains more than one paragraph, or a
long paragraph. For single and short paragraphs, use alert boxes instead.
When using panels, make sure to add the HTML parser markup to the beginning of your document's body:
`{::options parse_block_html="true" /}`.
{: #html-parser}
Copy paste the following code according to what you want to present to the user
and replace only the description. The available colors are:
blue (`info`), green (`success`), amber (`warning`) and red (`danger`), as follows.
### Additional Information
Use the following code for **important notes** and additional information:
```html
**Note**
{: .panel-heading}
NOTE DESCRIPTION
```
To apply to a single paragraph, use an alert box:
```
My important paragraph.
{: .alert .alert-info}
```
Blue panels render like:
**Note**
{: .panel-heading}
NOTE DESCRIPTION
And blue alert boxes render like:
My important paragraph.
{: .alert .alert-info}
If you want the text inside the alert box to be blue as well, we need to apply [custom styles](#styles)
to the markdown document. They will override the existing ones. Add the following `style` tag to the end of your file.
```css
```
### Warnings
Use the following code for warnings, like information that may have a different
result if not used correctly:
```html
**Warning**
{: .panel-heading}
WARNING DESCRIPTION
```
To apply to a single paragraph, use an alert box:
```
My warning paragraph.
{: .alert .alert-warning}
```
Amber panels render like:
**Warning**
{: .panel-heading}
WARNING DESCRIPTION
And amber alert boxes render like:
My warning paragraph.
{: .alert .alert-warning}
If you want the text inside the alert box to be amber as well, we need to apply [custom styles](#styles)
to the markdown document. They will override the existing ones. Add the following `style` tag to the end of your file.
```css
```
### Danger
Use the following code for crucial warnings, like commands that result in loss
of data:
```html
**Danger**
{: .panel-heading}
DANGER DESCRIPTION
```
To apply to a single paragraph, use an alert box:
```
My danger paragraph.
{: .alert .alert-danger}
```
Red panels render like:
**Danger**
{: .panel-heading}
DANGER DESCRIPTION
And red alert boxes render like:
My danger paragraph.
{: .alert .alert-danger}
If you want the text inside the alert box to be red as well, we need to apply [custom styles](#styles)
to the markdown document. They will override the existing ones. Add the following `style` tag to the end of your file.
```css
```
### Do's and Don'ts
You can use the combination of green and red panels or alert boxes for "Do's and Don'ts":
```html
**Do's**
{: .panel-heading}
THINGS TO DO
```
or, use an alert box:
```
TO DO.
{: .alert .alert-success}
```
Not to do:
```html
**Don'ts**
{: .panel-heading}
THINGS NOT TO DO
```
or, use an alert box:
```
NOT TO DO.
{: .alert .alert-danger}
```
By doing so, the green panels for "DO'S" will look like:
**Do's**
{: .panel-heading}
THINGS TO DO
or, if you chose an alert box:
TO DO.
{: .alert .alert-success}
If you want the text inside the alert box to be green as well,
we need to apply [custom styles](#styles)
to the markdown document. They will override the existing ones.
Add the following `style` tag to the end of your file.
```css
```
And for your "DON'TS" within red panels will look like:
**Don'ts**
{: .panel-heading}
THINGS NOT TO DO
or, if you chose a red alert box:
NOT TO DO.
{: .alert .alert-danger}
### Custom alert panels and alert boxes
All the previously mentioned alert boxes and panels are available by
default by [Bootstrap]. If we want them in a different
color, we need [custom styles](#styles). At [about.GitLab.com], we
can use the orange and the purple one, as follows.
When using panels, don't forget to add to the beginning of your file the
[HTML parser markup](#html-parser) to be able to mix HMTL + Markdown:
`{::options parse_block_html="true" /}`.
#### GitLab Orange Alert Panel
**Heading**
{: .panel-heading}
Text in markdown.
Panel block markup:
```html
**Heading**
{: .panel-heading}
Text in markdown.
```
#### GitLab Orange Alert Box
My text in an orange box.
{: .alert .alert-gitlab-orange}
Box block markup:
```md
My text in an orange box.
{: .alert .alert-gitlab-orange}
```
#### GitLab Purple Alert Panel
**Heading**
{: .panel-heading}
Text in markdown.
Panel block markup:
```html
**Heading**
{: .panel-heading}
Text in markdown.
```
#### GitLab Purple Alert Box
My text in an purple box.
{: .alert .alert-gitlab-purple}
Box block markup:
```md
My text in an purple box.
{: .alert .alert-gitlab-purple}
```
### GitLab Webcast Alert Box
To be used in a CTA for webcast announcement in blog posts.
You can use it for other purposes as well. Use it together with the [HMTL parser](#html-parser):
The webcast I want to announce - [Register here][webcast-link]!
{: .alert .alert-webcast}
[webcast-link]: #
```md
{::options parse_block_html="true" /}
The webcast I want to announce - [Register here][webcast-link]!
{: .alert .alert-webcast}
```
----
## Styles
Yes, guess what?
This:
```css
```
Plus:
```
Hey! Hover the cursor over me and guess what?! :)
{: .purple}
```
Equals to:
**Output**
{: .panel-heading}
Hey! Hover the cursor over me and guess what?! :)
{: .purple}
And yes, the `