Answers for "markdown how to add code block"

10

table in markdown

Colons can be used to align columns.

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned | $1600 |
| col 2 is      | centered      |   $12 |
| zebra stripes | are neat      |    $1 |

Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3
Posted by: Guest on May-01-2020
2

markdown block code

```javascript
var s = "JavaScript syntax highlighting";
alert(s);
```

```
No language indicated, so no syntax highlighting. 
But let's throw in a <b>tag</b>.
```
Posted by: Guest on May-23-2021
28

markdown

# tier 1 header
##### tier 5 header
**bold**  or  __bold__
*italic*  or  _italic_

[link to markdown guide](https://www.markdownguide.org/basic-syntax/)

> This is a quote. Quotes are indented and a different colour.

show small bits of code with backticks: `print("hello world")` 

- [x] This is a complete item
- [ ] This is an incomplete item

you can also include html code if you want to be more specific.
For example, this would make a picture with a width of 200:
<img src="drawing.jpg" alt="drawing" width="200"/>
Posted by: Guest on May-12-2020
-1

markdown code block

```ruby
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
```
Posted by: Guest on January-21-2021

Browse Popular Code Answers by Language