7

Possible Duplicate:
How to use formatting in comments?

Its being more than a month since I started using Stack Overflow, and yet I haven't figured out how to highlight words on the comments that I make on the questions. Can somebody tell me how to do that?

5
  • What do you mean?
    – Adam Lear StaffMod
    Commented Apr 14, 2011 at 17:03
  • I mean in this comments that i am writing right here. How do i highlight any of this words i am just typing?
    – sfrj
    Commented Apr 14, 2011 at 17:07
  • Do you mean like this or like this or like this? Commented Apr 14, 2011 at 17:11
  • Or maybe like this?
    – adamjford
    Commented Apr 14, 2011 at 17:13
  • Yes that is what i mean :) how can i do that?
    – sfrj
    Commented Apr 14, 2011 at 17:15

3 Answers 3

15

Do you mean highlighting like this?

If so, use the backtick - enclose the desired words, thus `word` becomes word.

You can also use 3 back ticks to enclose your whole code

#This is some code 
df=df['data'] + df['set']
2
5

To highlight words like this, use backticks: `like this`

To italicize words, use asterisks: *like this*

To bold words, use double asterisks: **like this**

4
  • Testing if it works
    – sfrj
    Commented Apr 14, 2011 at 19:39
  • Did it work i cant really see?
    – sfrj
    Commented Apr 14, 2011 at 19:39
  • Oh yes it did :) sorry Thank you very much now i know.
    – sfrj
    Commented Apr 14, 2011 at 19:40
  • backticks are not for highlighting words. They are meant for code formatting, and IMO using them to highlight words is wrong. Commented Sep 15, 2017 at 8:21
2

Syntax highlighting is not applied to code blocks in comments, so there's no way to do this at this time.

2
  • good to know that :) But i dont need to highlight code, just sencences or words like this that i am writing right now.
    – sfrj
    Commented Apr 14, 2011 at 17:09
  • How is syntax highlighting done in an answer(it is not there in the formatting help section of help center) Commented May 8, 2015 at 15:32

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