# Code blocks not working correctly?

**URL:** <https://meta.discourse.org/t/code-blocks-not-working-correctly/35451>\
**Category:** Bug\
**Created:** [2015 年 11 月 11 日午前 11:18 UTC](https://meta.discourse.org/t/code-blocks-not-working-correctly/35451 "2015-11-11T11:18:34Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2015 年 11 月 11 日午後 12:41 UTC](https://meta.discourse.org/t/code-blocks-not-working-correctly/35451/4 "2015-11-11T12:41:03Z")

</div>

What?

No, you use \<pre\> tags.

How to use Code Blocks (code with backticks are in pre tags)

```
```
function some(JavaScript, "code"){}
```
```

Which will produce

```plaintext
function some(JavaScript, "code"){}

```

Or you can use 4 spaces (code with spaces are in pre tags)

```
function some(JavaScript, "code"){}
```

which will produce

```
function some(JavaScript, "code"){}

```

You can also put them inline using a _single_ back-tick

Example: (paragraph below with backticks are in pre tags)

```
This is an example of it being inline `function some(JavaScript, "code"){}` and more text can be added after too
```

Which produces:  
This is an example of it being inline `function some(JavaScript, "code"){}` and more text can be added after too

And how to insert your pre tag

```plaintext
<pre>
    function some(JavaScript, "code"){}
</pre>

```

---

_[View the full topic](https://meta.discourse.org/t/code-blocks-not-working-correctly/35451)._
