If I am adding some comments to user post, how do I add like this Code
(preview in view, should appear within gray background) or if I add some link on their post link (preview as Hyperlink).
Comments can use a scaled back version of Markdown.
- To use code formatting in a comment, utilize the backticks (
`
) around the code you want to format
Example:
This is a block of `code`
formats to "This is a block of code
"
- To use links, you do this utilize the format
[display text](url)
Example:
[This is a link to comment help](https://stackoverflow.com/editing-help#comment-formatting)
displays as "This is a link to comment help"
-
2
-
@D.Jones Then it looks like this: [This is a link to comment help] – Kumāra Bhikkhu Jul 1 '20 at 8:15
I recently made a link out of a chunk of code that will show up as:
By typing the following:
<a href="http://api.jquery.com/filter/">`$(array1).filter(array2);`</a>
The same way
you just did or am I not understanding your question? – codeMagic Apr 23 '15 at 12:50`content`
for code, and the[link text](url)
for links like this – ryanyuyu Apr 23 '15 at 12:50Add Comment
button if you ever need to be reminded – logic Apr 23 '15 at 12:52[text][1]
and at end of question/answer[1]: https://meta.stackoverflow.com/q/291214/5569922
. This is called a reference-style link in Markdown. It is quite useful to also know the format ryanyuyu points out[text](url)
, which is called inline-style links. – John Doe Dec 23 '19 at 3:08