What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

Umm, I feel dumb for asking this, but how to I add HTML into my questions and answers with this editor? Sometimes it works for me and sometimes it doesn't...

I know about the faq, that the site uses markdown and there are allowed tags as well.


Related:

share|improve this question
    
OK, to clarify, since I can't even edit my post above... I added some HTML to this post.. it didn't show up, but I've noticed that if I go back and edit the post and add HTML tags, it works. Is this a bug or intentional? –  Mottie Sep 22 '09 at 17:54

3 Answers 3

up vote 2 down vote accepted

It's not clear what you mean.

Do you mean show html code snippets? If so, indent your code four spaces or select and use the "code" button on the toolbar (Ctrl-K as a keyboard shortcut). <pre> and <code> tags also work, and you can use backticks (`) for inline snippets.

Do you mean add formatting to your question using html? If so, common html tags should work as expected. However, the input box was really designed for markdown, and so it will also apply markdown rules anywhere they fit.

share|improve this answer
    
Today when I tried to add an <html> tag to my answer or even <body> it didn't work, but if you look at the link I have in the top post... it's worked before. –  Mottie Sep 22 '09 at 17:47
    
Oh well, I'll just re-edit my posts when I have to or keep using the backticks, that seems to work better –  Mottie Sep 23 '09 at 14:52

(Re: It works) That's just embedding code. You put all of this in a <pre><code>block and escape the '<' with &lt; However the easiest way is to paste it in, select it, and press control-K or click on the 101/010 icon.

share|improve this answer

I don't know why, but I've noticed a couple of time that using the backtick rather than four leading spaces works better for some HTML.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .