Showing results for 
Search instead for 
Did you mean: 

Behavior of the <code> tag

0 Kudos


I was testing how sharing of code snippets would look like under the new blogging platform, so here what I wrote :

In the text editor, I used the <code> tag around my code:

But then I switched to the visual editor and it looked like this. Only the first paragraph was shown in the code font:

Switching back to the text editor, the <code> tag changed to contain only the first paragraph:

Is this the expected behavior for the <code> tag?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Danny,

I ran two tests for code snippets.

One worked and the other didn't.

Here's the first -->

Here's the second --> (didn't work)

To make it work, I didn't use the text editor, I used the standard default visual editor.

I typed in first line of text.

Then copied my code.

Then selected my code and used the shortcut key shift-alt-x and it changed the code.

Let me know if this is what you were looking for.

with kind regards,


0 Kudos

I didn't try the keyboard shortcuts.

It automatically puts <code></code> on each line, so I guess that's how it's intended to be used instead of large blocks of text.

Thank you very much!

Answers (0)